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 }
In Section
Seekers of Perl Wisdom