Frequency analysis for simultaneous dice rolls - follow-up
Found a solution without foreach 

@single_sum_of_eyes = sort{$a &lt;=&gt; $b} keys %count;
    for($j = 0; $j&lt;scalar @single_sum_of_eyes; $j++)
    {
        push(@frequency,$count{$single_sum_of_eyes[$j]});
    }
    for($i=0; $i&lt;scalar @frequency; $i++)
    {
    printf "\n\t$single_sum_of_eyes[$i]\t\t\t $frequency[$i]\t\t%g", ($frequency[$i]/$number_of_rolls)*100;
    }
    print "\n";