At 01:54 PM 12/1/2005 -0500, [EMAIL PROTECTED] wrote:
>2. A random number generator can generate duplicates and still be random 
>(of course it could also be repeating). Indeed, a random number 
>generator should, in general, generate duplicates. It is a special case 
>of random number generation where duplicates are not allowed.

Right, I anticipated this by checking whether the filename already existed.
I never expected that duplicates were impossible.


>5. Using a random number generator to generate unique files names seems 
>kind of odd. Why not use the date and time plus -e file operator and a 
>little character string magic (auto-increment a character string with 
>++) to generate the file names?

I guess in my zeal to show the weakness of the rand() function I've
distracted myself and everybody from the real problem.  I can even accept
2^15 as the number domain.  Let's refocus.  The real problem is that on
Monday it can spit out a sequence of numbers x, y, z, a, b, c.  Then three
days later it can spit out the exact same sequence x, y, z, a, b, c.  This
seems very wrong.  The concept of randomness means that the order cannot be
predicted and has no pattern.  In this case however, the sequence *repeats*.
Even in a small 2^15 domain, no sequence should repeat.  Remember this is a
mod_perl script that is always "on".  






--
REMEMBER THE WORLD TRADE CENTER         ---=< WTC 911 >=--
"...ne cede malis"

00000100

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to