Good solutions above, this is how you could do it in Perl 6:
my $fh = open("file"); for =$fh->$line1,$line2 { # do whatever with the two lines }
In reply to Re: Reading two lines per loop iteration
by tirwhan
in thread Reading two lines per loop iteration
by fishnflute
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |