sub randl{ return int( -$_[1] * log( $_[0] * rand() ) ); } sub BiasedChooseFrom{ return $_[ int( randl(4,int($#_/2)) ) ]; }