use List::AllUtils qw( singleton ); my @new6invslice = @array[ singleton 0 .. $#array, @slice_idx ];