As the first answer suggested, your best bet is to make sure you store the file name at the same time you open the filehandle.
Failing that, this works on Linux, but is very non-portable:
open my $fh, '/etc/motd'; my $fd = fileno($fh); print readlink("/proc/$$/fd/$fd");
In reply to Re: reverse engineer a filehandle
by tobyink
in thread reverse engineer a filehandle
by smile4me
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |