my @array = (0,1,2,3,4,5,6,7,8,9); # The source array my %DropList = map {$_ => 1} (2,4,6,8); # A hash of the indices to remove my @newarray = @array[grep {not exists $DropList{$_}} (0..$#array)]; print "@newarray\n";