Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
P is for Practical
 
PerlMonks  

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.

Cheers,

JohnGG


Comment on Re: symlink woes
Re^2: symlink woes
by taint (Hermit) 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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2014-04-18 09:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (465 votes), past polls