if ($^O eq 'linux' and -d /proc) { $procpath=fileno($fh); $filename=readlink($procpath); $filename=undef unless -e $filename; }