Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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
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?
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 musing on the Monastery: (7)
As of 2015-07-29 03:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls