I just wanted to point out that the index ($i) does not have to be global. You could write:
while (my $i < @a)... and have $i scoped to the while loop. Check out Lexical scoping like a fox.
In reply to Re: Re: Re: Inserting into an array while stepping through it
by zakb
in thread Inserting into an array while stepping through it
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |