RE: shift inside of for loop
ject: shift inside of for loop Hi all, I've noticed some interesting behavior when trying to shift an array that you're iterating over. For example: my @ary = (0..1000); for (@ary) { if($_ <= 1000) { shift @ary; } } print scalar @ary, &quo
shift inside of for loop
Hi all, I've noticed some interesting behavior when trying to shift an array that you're iterating over. For example: my @ary = (0..1000); for (@ary) { if($_ <= 1000) { shift @ary; } } print scalar @ary, "\n"; This prints 500 on my NT box with ActiveStat