in reply to geometric random distributions
int(log(1- rand)/log(1 - $p))
will give you a random integer from a geometric distribution with probability $p. $p must, of course, be between 0 and 1.
In Section
Seekers of Perl Wisdom
in reply to geometric random distributions