Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Array of filehandles

by Krambambuli (Deacon)
on Apr 29, 2013 at 07:43 UTC ( #1031176=note: print w/ replies, xml ) Need Help??


in reply to Array of filehandles

You could try as well something like

my %handles = map { open my $fh, '<', $_; $fh => $_ } @files;

and further use keys %handles instead of @handles, and then the filename is $handles{$fh}.


Comment on Re: Array of filehandles

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1031176]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2014-12-18 11:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (50 votes), past polls