use Math::Random::OO 'UniformInt'; my $prng = UniformInt(1,10); print $prng->next; # integer between 1 and 10 inclusive