Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Reading two text files parallelly...

by Hugmeir (Sexton)
on Nov 09, 2010 at 19:15 UTC ( #870384=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (my ($test1, $test2) = (scalar <$fh1>, scalar <$fh2>)) {
       last unless defined $test1 or defined $test2;
       ...
    }
    
  2. or download this
    while ( my $test1, $test2 ) = (scalar <$fh1> // (), scalar <$fh2> // (
    +) ) {
        ...
    }
    
  3. or download this
    sub read_double_file {
        my ($fh1, $fh2)                 = @_;
    ...
    while ( my ($line_from_1, $line_from_2) = read_double_file($fh1, $fh2)
    + ) {
        ...
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2015-07-05 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls