Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 (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?
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 making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2014-09-17 03:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (56 votes), past polls