Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Generating random 6 digit numbers

by ehdonhon (Curate)
on Aug 26, 2002 at 04:28 UTC ( [id://192766]=note: print w/replies, xml ) Need Help??


in reply to Re: Generating random 6 digit numbers
in thread Generating random 6 digit numbers

@nums = 100000 .. 999999; # Generate all the possible numbers

I guess it depends on what is meant by "6 digit number". If it means "a number more than the greatest 5 digit number (99,999) but less than the least 7 digit number (1,000,000)", which is probably the case, then this works.

The other possible definition is "A combination of numbers 0 through 9 taken 6 times." In that case, you could do this:
@numbs = '000000' .. '999999';

Replies are listed 'Best First'.
Re: Re: Re: Generating random 6 digit numbers
by BrowserUk (Patriarch) on Aug 26, 2002 at 06:52 UTC

    Hmmm! By that definition, we could all say we earned a 6-digit salary, even if it was $000,000.00.


    What's this about a "crooked mitre"? I'm good at woodwork!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-19 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found