|Don't ask to ask, just ask|
Re^8: Generate a unique IDby BrowserUk (Pope)
|on Nov 17, 2010 at 17:58 UTC||Need Help??|
Hm. With 52 choices for the first character and 62 thereafter, a 4 character is capable of producing 52 * 62**3 different strings:12,393,056
A tiny part of that is explainable by your using rand( $#array ) instead of rand( @array ) and therefore never picking the final character in those array, giving 51 * 61**3 := 11576031. But the earlyness of the repeat--as low a 24,000--is way too early to be explained even by the Birthday paradox.
Minorly tweaked version of your code used above:
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.