my %remove; ++$remove{$_} foreach @remindexes; @array = map ((exists $remove{$_} ? () : $array[$_]), 0..$#array);