beginners  

Re: Random generator

Janek Schleicher
Fri, 19 Jul 2002 03:34:56 -0700

Mohammad K Jilani wrote at Wed, 17 Jul 2002 18:15:17 +0200:

> How can I generate a whole number betwee 10 - 99?
> 

Another cool way,
where I don't need to think,
is using the String::Random module:

use String::Random qw/random_string/;
print random_string "0n", [1..9];

or perhaps more readable as

print random_string "01" => [1..9],[0..9];


Greetings,
Janek


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]