Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Re: Re: Inserting into an array while stepping through itby zakb (Pilgrim) |
on Jun 13, 2003 at 14:11 UTC ( [id://265682]=note: print w/replies, xml ) | Need Help?? |
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 Section
Seekers of Perl Wisdom
|
|