i think you're going to have to use statistics. i don't believe Perl has anything built-in to do it, though there might be a module on CPAN. Perl's rand($n) will give you numbers (more or less) uniformly distributed between 0 and 1. its up to you to convert this to a normalized distribution.