use File::Find; # might be helpful use Cwd; # also pretty useful with this sort of thing my $files = ; my $where = readlink("$files"); print "$files => $where\n";