my @array = qw(a b c d e); my @slice = @array[0, 2, 4]; print join "-", @slice; # this produces "a-c-e"