According to http://perldoc.perl.org/perlopentut.html: "Indirect filehandles also make it easy to pass filehandles to and return filehandles from subroutines."
Okay, so how do I find out which file this filehandle references? If the file name is dynamically generated, and all I have is a filehandle, how do I know which file is being written into?
For example:Thanks,#get a filehandle $fh = get_fh_from_file( generate_filename() ); if ( print_data( $fh, $data ) ) { say "data printed to file: $fh"; } ## got: data printed to file: *TRSC::FileUtils::FH; ## expected: '/path/to/file'
In reply to reverse engineer a filehandle by smile4me
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |