http://www.perlmonks.org?node_id=743951


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.


www.jasonkohles.com
We're not surrounded, we're in a target-rich environment!