![]() |
|
There's more than one way to do things | |
PerlMonks |
Re^3: How to generate different random numbers?by ranjan_jajodia (Monk) |
on Sep 05, 2004 at 06:26 UTC ( #388578=note: print w/replies, xml ) | Need Help?? |
hi johnnywang, As soon as you talk about 'distinct', 'random' goes out of the window. So i assume you need distinct numbers upon which you can't apply any pattern. The best way is to write a hash function on the current date + time which ofcourse must not give always increasing or decreasing numbers. Use google to find a suitable algorithm ( i am sure people have done it before).
In Section
Seekers of Perl Wisdom
|
|