http://qs321.pair.com?node_id=795628


in reply to Problem creating array

... my $p=0; push @result, ($p++)x$_ for @count; ...