my @array = ('aa'..'zz'); my %slice_idx = map( ($_ => 1), 6,13,42,66,69 ); my @invslice = @array[ grep ! exists $slice_idx{$_}, 0..$#array ];