or download this
canis [shmem] /home/shmem > time perl4 -e '$iters = 100_000; $runs = 6
+; for $sides (1,2,3,4,6,8,10,20,100) { printf "%-5s", "D$sides:"; for
+ (1 .. $runs) { $tot = 0; for (1 .. $iters) { $tot += int(rand $sides
+)+1; } print " ", $tot/$iters; } print "\n"; }'
D1: 1 1 1 1 1 1
...
Perl may be copied only under the terms of either the Artistic License
+ or the
GNU General Public License, which may be found in the Perl 4.0 source
+kit.