could be one solution. If it was me however, I would probably read the smaller file into an array or another structure and just go through the other one, instead of reading lines from the second loop as many times as the amount of lines the first one has.while ($line_f1 = <FILE>) { while($line_f2 = <FILE2>) { # I'm sure the rest you can do it } seek(FILE2,0,0); }
In reply to Re: Loop through 2 files in parallel
by AndyZaft
in thread Loop through 2 files in parallel
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |