http://www.perlmonks.org?node_id=1031724


in reply to reading two files in parallel

Something like this?

while (1) { my $a = <F1> or last; my $b = <F2> or last; # use $a and $b here }