Return to Snippet

Revision: 60108
at October 20, 2012 15:23 by symsec


Initial Code
#!/usr/bin/perl

use strict;

while(chomp(my $file = <>))
{
        while(-l $file)
        {
                $file   = readlink $file;
        }
        print "$file\n";
}

Initial URL


Initial Description
Snippet obtained from Stackoverflow courtesy of [Loki Astari](http://stackoverflow.com/a/130428)

Initial Title
Perl recursive loop symbolic link final destination using Unix readlink command

Initial Tags
link, perl

Initial Language
Perl