in reply to Removing certain elements from an array

This is a one liner that works well for me.
splice( @array, $_ - $ind++, 1 ) foreach ( sort @remindexes );

Have Fun - XDB19

Replies are listed 'Best First'.
Re: Re: Removing certain elements from an array
by Cirollo (Friar) on Jun 26, 2001 at 19:38 UTC
    Attack from the rear:

    splice( @array, $_, 1) for (reverse sort @remindexes);

    This way, you start with the highest array index and move down, so you don't have to keep count of how many elements you have removed.