in reply to Re: tracing symlinks
in thread tracing symlinks

What about the readlink function?

Replies are listed 'Best First'.
Re: Re: Re: tracing symlinks
by Masem (Monsignor) on May 08, 2001 at 15:22 UTC
    That would work, except that it does "die" on a system without symlinks.

    I think , however, a combination of this and the '-l' test would do the trick, wrapping the readlink function in an eval (even suggested as such in the eval POD to handle platform specific features).

    Something along the lines of:

    my $filename = "something"; while ( -l $filename ) { eval { $filename = readlink $filename } }


    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain