in reply to Re: Last undefines a for loop's itererator?
in thread Last undefines a for loop's itererator?
The problem with iterating over indices is that BUU is iterating over a sorted temporary list, so if you don’t create it en passant in the foreach() list, you need to store it in a temporary array variable. And since you have a temp array, you can afford to destroy it, so the simplest approach is while( @list ) { ...; shift @list }.
Makeshifts last the longest.
|
|---|