#!/usr/bin/perl my $lpath = /var/tmp/flink; my $fp1 = /var/tmp/file1; my $realpath =readlink($lpath); #which returns file1; my $absolutepath = abs_path($realpath); #returns ~/perl/file1, where ~/perl is where my perl script is, not correct if (-e $realpath) { print "$realpath exist\n"; } else { print "not exist\n"; #which is not true }