Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Symbolic Links

by grinder (Bishop)
on Aug 02, 2001 at 20:39 UTC ( [id://101710]=note: print w/replies, xml ) Need Help??


in reply to Symbolic Links

You want to investigate the readlink function.

 my $dir = readlink( '/some/directory' );

If you have symbolic links pointing to other symbolic links you will have to walk down the chain:

while( -l $dir ) { $dir = readlink $dir }

or more concise:

  1 while( -l $dir and $dir=readlink($dir))

--

g r i n d e r

Replies are listed 'Best First'.
Re: Re: Symbolic Links
by merlyn (Sage) on Aug 03, 2001 at 02:28 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-10-13 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.