#!/usr/bin/perl # test_c.pl - Don Yang (uguu.org) # # 03/15/04 use strict; my ($i, $j, @s, @c); $ARGV[0] && (srand $ARGV[0]); @s = ("nemu", "miharu", "yoriko-san"); @c = (0, 0, 0); for($i = 0; $i < 10000; $i++) { $j = int(rand 3); print $s[$j], "\n"; $c[$j]++; } print $s[0], ": ", $c[0], "\n", $s[1], ": ", $c[1], "\n", $s[2], ": ", $c[2], "\n";