Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: reading two files in parallel

by Laurent_R (Monsignor)
on May 02, 2013 at 11:57 UTC ( #1031741=note: print w/ replies, xml ) Need Help??

in reply to reading two files in parallel

Nested loops will not give you what you need. Besides Moritz's solution, you could also use one loop on one of the files (but not on the other):

while (my $a = <F1>) { my $b = <F2>; # do something with $a and $b }

Comment on Re: reading two files in parallel
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2015-11-30 01:46 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (756 votes), past polls