in reply to Forcing perl to print filenames instead
I don't know of a way to get back the filename from a filehandle, and i think it's because a filehandle can be
also a pipe or something else - not just a file-handle.
but the error you're getting is telling me that you probably should
test if your object exists before you're calling the method
"blahblah" on it (i can just guess as you haven't shown any code). then if the object does not exist you can
add the appropriate exception handling.
for knowing which file you are processing i would probably
just store the current filename in a variable.
if that's not what you meant please elaborate and show us
some (few) lines of code.