Help for this page

Select Code to Download


  1. or download this
    perl -e "my $iters = 100_000; my $runs = 6; for my $sides (qw{1 2 3 4 
    +6 8 10 20 100}) { printf '%-5s', qq(D$sides:); for (1 ..$runs) { my $
    +tot = 0; for (1 .. $iters) { $tot += int(rand $sides)+1; } print ' ',
    + $tot/$iters; } print qq(\n); } print qq(Perl $^V $^O\n)"
    
  2. or download this
    # perl 5.26 64bit
    D1:   1 1 1 1 1 1
    ...
    D100: 50.39945 50.51811 50.47581 50.44648 50.4911 50.47012
    Perl v5.26.2 MSWin32