in reply to Re: Efficient array element deletion
in thread Efficient array element deletion

And if you aren't afraid of Perl you can:

my $replace = 0; for my $x (0 .. $#array) { next unless # pass of your condition; $array[$replace++] = $array[$x]; }

or maybe even:

your condition and $array[$replace++] = $array[$_] for 0 .. $#array;

Perl's payment curve coincides with its learning curve.