If I have a filehandle, how can I get at the filename? What I really want it to do is give me the name when I treat is as a string, like a CGI upload filehandle. I don't seem to be able to find anything about this from google, but I'm not really sure what I should be looking for. Can someone point me in the right direction?
Thanks, Cxx
just found this via google: > Is there a way to get the filename from an open filehandle >that has been passed to another package? No. There may not even *be* a filename.
So can I amend my question: I'm trying to test some code that would normally take an uploaded (CGI) filehandle and use it's file extension to guess if it's an archive and unpack it appropriately. I want to be able to test it directly, so how do I create an object that mimics the behaviour of cgi filehandles?
Thanks again.
In reply to filenames from filehandles by CassJ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |