http://qs1969.pair.com?node_id=322574


in reply to random num generator

Hi florrie,
Heres how I do it, you will probably get other suggestions too...

sub generateRandomNumber { my $len = shift || 12; my @chars = (0..9); return join '', map { $chars[ rand @chars ] } 1..$len; }