in reply to deleteing array elements I get mad!!

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.
  • Comment on Re: deleteing array elements I get mad!!