Just do it from the back.
foreach my $i (reverse @arrayindex) { splice @array, $i, 1; }
lodin
Update: This assumes sorted indexes. See GrandFather's note if they're not sorted.
In reply to Re: Remove array elements dynamically! (reverse)
by lodin
in thread Remove array elements dynamically!
by newbio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |