# test-> a.pl
my $file = \'/home/joe/test\'; if ( -f $file && -l $file ) { print readlink( $file ) ; }
how to get the Absolu
if you use File::Spec rel2abs along with readlink you'll get the abs path even if it's a symlink to another symlink
use File::Spec; $path = File::Spec->rel2abs( readlink($file) ) ;