Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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.



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 universe expands...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2017-07-23 17:22 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (347 votes). Check out past polls.