in reply to Re^2: How foreach loops decide what to iterate through
in thread How foreach loops decide what to iterate through
Essentially what you are doing is something like this:
my @a = (1); for ( my $i = 0 ; $i <= $#a ; $i++ ) { push( @a, 1 ); }
So the loop isn't being restarted or re-evaluated, but because you are extending the thing it's iterating over, it never gets to the end.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: How foreach loops decide what to iterate through
by jvector (Friar) on Feb 15, 2009 at 22:38 UTC | |
by ikegami (Patriarch) on Feb 16, 2009 at 02:24 UTC |
In Section
Seekers of Perl Wisdom