Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: globbing filehandles in arrays

by ikegami (Patriarch)
on Jan 23, 2009 at 13:50 UTC ( [id://738484]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (my $line = readline($FH[$i])) {
       ...
    }
    
  2. or download this
    my $fh = $FH[$i];
    while (my $line = <$fh>) {
       ...
    }
    
  3. or download this
    open(FILE_A,">","a.txt") || ...;
    open(FILE_B,">","b.txt") || ...;
    my @FH=(*FILE_A,*FILE_B);
    
  4. or download this
    open(my $FILE_A,">","a.txt") || ...;
    open(my $FILE_B,">","b.txt") || ...;
    my @FH=($FILE_A,$FILE_B);
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-19 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found