in reply to Re^2: How do I get a unique Perl Interpreter ID?
in thread How do I get a unique Perl Interpreter ID?
Why do you think some interpreter ID (if such a thing did exist) would be fundamentally better from a randomness/predictability perspective than time+rand, or something similar?
Do you actually need cryptographically secure randomness, or simply distinctness (as one might have inferred from your OP)? A simple counter (like a sequence in a DB) would be producing distinct values, although they're essentially 100% predictable. And as time is like a counter - automatically incremented externally of your program - it doesn't seem like a bad choice in case distinctness is all that you need (and if you're worried about being returned the same microsecond, just wait until it has advanced...)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How do I get a unique Perl Interpreter ID?
by wrog (Friar) on Dec 01, 2011 at 12:16 UTC |