for my $i ( reverse( 0 .. $#array ) ) { if ( $array[$i] =~ /criteria/ ) { splice @array, $i, 1; } }