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 }
In reply to Re: reading two files in parallel
by Laurent_R
in thread reading two files in parallel
by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |