in reply to Symbolic Links
You want to investigate the readlink function.
my $dir = readlink( '/some/directory' );
g r i n d e r
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
- Comment on Re: Symbolic Links
- Select or Download Code
- Watch for: Direct replies / Any replies
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Symbolic Links
by merlyn (Sage) on Aug 03, 2001 at 02:28 UTC |
In Section
Seekers of Perl Wisdom