my @count = qw/ 3 1 5 1 10 3 /; my @list= my %rcount = reverse @count; say "@list" __END__ 1 1 1 1