Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: random number with range

by Enlil (Parson)
on Jun 01, 2006 at 18:17 UTC ( #553110=note: print w/replies, xml ) Need Help??


in reply to Re^2: random number with range
in thread random number with range

won't disagree, but first thing that came to mind for similar situations where the technique is useful, like the ubiquitous password generator:
my @chars = ( 'A' .. 'Z', 0 .. 9); my $pw = join('',@chars[ map { rand @chars } ( 1 .. 12 ) ]);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://553110]
help
Chatterbox?
[stevieb]: failure! $current_taask does not exist. No further work pending. Go home
[erix]: Upward Mobility Day
[erix]: in 3D (Walsingham)
erix likes the Toe-Rays
[marinersk]: stevieb LOL yep.

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2017-05-25 15:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?