On Sat, Feb 12, 2005 at 06:39:01PM +1100, Damian Conway wrote:
pick - select at random from a list, array, or hash
OOC, will there be a way to control where Cpick gets its randomness
from? (e.g. perl's builtin PRNG, /dev/random, egd, etc)
--Dks
--
[EMAIL PROTECTED]
David Storrs OOC'd:
OOC, will there be a way to control where Cpick gets its randomness
from? (e.g. perl's builtin PRNG, /dev/random, egd, etc)
Sure:
# Use RBR (Really Bad Randomness) algorithm...
temp *rand (Num ?$max = 1) {
return $max/2;
}
my $guess = @data.pick;
Damian