Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: random num generator

by barrd (Monsignor)
on Jan 20, 2004 at 12:59 UTC ( #322574=note: print w/replies, xml ) Need Help??


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; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://322574]
help
Chatterbox?
LanX thinks finddata should be renamed into eraser
Discipulus mmh..
[Corion]: Thanks, LanX, restored ;)

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (15)
As of 2017-03-27 14:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.