[EMAIL PROTECTED] wrote:
> 
> Hi -

Hello,

> A little OT, but, with Perl runing under Linux,
> is there any way to get the 'target' file name
> of a 'soft' link?

my $actual_file = readlink $soft_link;

> Or even determine a filename
> is a 'soft' link?

print "$file_name is a 'soft' link.\n" if -l $file_name;

> (By 'soft' I mean a link
> created so: ln -s target link).

Or with perl:

    symlink OLDFILE,NEWFILE
            Creates a new filename symbolically linked to the old
filename.
            Returns `1' for success, `0' otherwise. On systems that
don't
            support symbolic links, produces a fatal error at run time.


perldoc -f readlink
perldoc -f -l
perldoc -f symlink
perldoc -f link
perldoc -f stat
perldoc -f lstat



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to