I agree with chromatic -- don't trust the client. The ability to upload .zip files named .jpg has been used to upload warez various places. In the general case, though...
if ($^O eq 'linux' and -d /proc) { $procpath=fileno($fh); $filename=readlink($procpath); $filename=undef unless -e $filename; }
note that this is linux-specific, though there is a similar proc on many unixes.
In reply to Re: filenames from filehandles
by theorbtwo
in thread filenames from filehandles
by CassJ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |