while (@a || @b) {print shift @a,shift @b} #### for(@a){print$_,$b[$0];$0++}