Iterating over the array in reverse will avoid the problem of the loop indices needing adjustment after an element is deleted.
Update: You changed the script while I was replying. Your description doesn't match now, although I suspect it will in a moment. ;o)
In reply to Re^2: Removing certain lines from array
by Loops
in thread Removing certain lines from array
by Dr Manhattan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |