# Without "x" for my $i (0..$#count) { for (1..$count[$i]) { push @result, $i; } }