my @rand = 1..54; my %rand = map { $_=int rand($rand[$#rand])+1, $rand{$_}++ } 1..10000; print "$_\t$rand{$_}$/" for sort { $a <=> $b } keys %rand