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\"; }
I think you'd want to do this differently. Try this:
while (scalar(@list) > 0) { $i = shift(@list); $j = shift(@list); print "i: $i, j:$j\n"; }
Keep in mind that this will destroy the list, but it will work for that little loop.