in reply to how to find the value of variable?

To your mind, what value should filehandle variable have? If you want to know the file name of the filehandle, you'll have to use IO::File::WithPath, IO::File::WithFilename or something like this.
Sorry if my advice was wrong.

Replies are listed 'Best First'.
Re^2: how to find the value of variable?
by Marshall (Canon) on Aug 10, 2012 at 13:41 UTC
    I think this is right. Typically once the file system has opened a file, it doesn't care nor keep track of the text string that was used to open the file in the first place.

    So, if the OP means "what was the text file "name/path" for this filehandle?, the user program would have to keep track of that name/path which is what these modules appear to do. There are weird sorts of situations that can arise, but it doesn't sound like further elaboration is needed.

    As a practical debugging matter, I would just add a print statement with that info for debugging or make a log entry of some sort. Or print the $name that was used in the open() in the debugger rather than trying to make sense of the filehandle structure.