#!/usr/local/bin/perl $dir = "/u/Tom"; opendir(MYDIR, $dir); while ($name = readdir(MYDIR)) { if (-l $dir . "/" . $name) { print ("$name is linked to "); print (readlink($dir . "/". $name) . "\n"); } } closedir(MYDIR);