in reply to Re: Iterating through an array using multiple loops and removing array elements
in thread Iterating through an array using multiple loops and removing array elements
Modifying an array while looping with foreach = not good.
What about while looping though it with while? Similarly, what about modifying a hash (using delete) while looping with for/foreach or while? From a quick skim through the doc it doesn't appear to be an issue.
I'll definitely keep in mind the shortcomings of this post in the future! Context is especially important when TIMTOWTDI!
Thanks for the help!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Iterating through an array using multiple loops and removing array elements
by kcott (Archbishop) on Apr 25, 2014 at 07:10 UTC |