@foo = (1,2,3);@bar=(4,5,6,7); while (@foo || @bar) { print "$foo[0]\t$bar[0]\n"; shift @foo; shift @bar; }