DB<16> @array =() DB<17> (@x) = splice @array,0,1 DB<18> x @x empty array DB<19> (@x) = shift @array DB<20> x @x 0 undef # WTF #### DB<1> @x = (1..3,0,undef,1..3) DB<2> $max=100 DB<3> while (my ($x) = shift @x) { print "$x,"; last if $max-- < 0 } 1,2,3,0,,1,2,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, DB<4> @x = (1..3,0,undef,1..3) DB<5> while (my $x = shift @x) { print "$x," } 1,2,3,