Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: random number with range

by salva (Abbot)
on Jun 01, 2006 at 17:34 UTC ( #553098=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $num = $min + rand($max - $min);
    
  2. or download this
    my $int = $min + int(rand($max - $min));
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://553098]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2016-02-08 06:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (268 votes), past polls