And you probably want to increment i by the size of the arrays you splice in when they get spliced in.for (my $i=0; $i <= $#array; $i++) { #stuff with $array[$i] }
In reply to Re: Inserting into an array while stepping through it
by runrig
in thread Inserting into an array while stepping through it
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |