Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Array of filehandles

by Krambambuli (Curate)
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}.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1031176]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2017-01-19 00:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (166 votes). Check out past polls.