open(FIND, "find $ARGV[0] -type l -print |") || die "Can't run find: $!"; while () { chop; if ( ! -e $_ ) { printf "target of link $_ (%s) doesn't exist\n", readlink; } }