Don't ask to ask, just ask | |
PerlMonks |
Re^2: Make random numbersby Marshall (Canon) |
on Dec 07, 2018 at 08:21 UTC ( [id://1226865]=note: print w/replies, xml ) | Need Help?? |
I did like your post. This should have been enough to get the OP started. There are 2 minor details to be addressed. The rand(1000) function will return float values from 0 and never reaching 1000. So we need to chop off the fractional part - that will yield ints from 0..999. To get the desired range, adding a constant offset of 1 will do the job.
In Section
Seekers of Perl Wisdom
|
|