my @a = ( 1 .. 4, undef, 6 .. 10 ); while (@a) { my $x = shift @a; say defined $x ? $x : 'undef'; }
In reply to Re: Why does a full iteration over array & shift is not emptying the array
by rubasov
in thread Why does a full iteration over array & shift is not emptying the array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |