Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Array of filehandles

by Krambambuli (Curate)
on Apr 29, 2013 at 07:43 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1031176]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-07-24 12:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.