What I\'m looking for is something like:
@list = qw(1 2 3 4 5 6); foreach (@list) { #perl magic goes here print \"i: $i, j:$j\\n\"; }
while ($#rec>0) { my($a,$b) = ( shift(@rec), shift(@rec) ); print "($a,$b)\n"; }