#the following gives: a 1 b 2 c 3 @arr1 = qw(a b c); @arr2 = qw(1 2 3); while (@arr1) {push @arr3, shift @arr1,shift @arr2} print "@arr3"; #BUT why does the following give an infinite loop? @arr1 = qw(a b c); @arr2 = qw(1 2 3); while ($push @arr3, shift @arr1,shift @arr2){}