Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: symlink woes

by johngg (Abbot)
on Aug 22, 2012 at 17:03 UTC ( #989098=note: print w/ replies, xml ) Need Help??

in reply to symlink woes

You could use lstat to determine whether your directory is actually a symlink to a directory and readlink to find out where it is pointing. The standard Cwd module might also allow you to keep better track of which directory you are in. I'm not sure how useful these pointers will be when having to interact with sudo but, hopefully, they will help you move forward.



Comment on Re: symlink woes
Replies are listed 'Best First'.
Re^2: symlink woes
by taint (Chaplain) on Apr 24, 2013 at 04:59 UTC
    Maybe expanding on something like:
    use File::Find; # might be helpful use Cwd; # also pretty useful with this sort of thing my $files = <some array here...>; my $where = readlink("$files"); print "$files => $where\n";
    #!/usr/bin/perl -Tw
    use perl::always;
    my $perl_version = "5.12.4";
    print $perl_version;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://989098]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2015-11-28 00:16 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (735 votes), past polls