Array / ref problems aside, it's generally counter-indicated by the owner's manual to muck with an array you're iterating over while you're iterating over it. Quoth perlsyn:
If any part of LIST is an array, "foreach" will get very confused if you add or remove elements within the loop body, for example with "splice". So don't do that.
In reply to Re: deleteing array elements I get mad!!
by Fletch
in thread deleteing array elements I get mad!!
by kurreburre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |