http://www.perlmonks.org?node_id=986562


in reply to removing elements from an array

Might your strings be numeric, or can you simply grep out non-digits?

@array = grep !/\D/, @array;

Otherwise, I'd grab every other like:

my $i; @array = grep ++$i%2, @array;