"be consistent" | |
PerlMonks |
Re: Re: Generating random 6 digit numbersby ehdonhon (Curate) |
on Aug 26, 2002 at 04:28 UTC ( [id://192766]=note: print w/replies, xml ) | Need Help?? |
@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:
In Section
Seekers of Perl Wisdom
|
|