in reply to
Ending up with duplicate keys in a hash?\
As said above...
$event_id = int(rand(25000));
[download]
is not guaranteed to produce unique event IDs.
I agree :)
You could use a function with locking that will increase a variable and return its value.
Comment on
Re: Ending up with duplicate keys in a hash?\
Download
Code
In Section
Seekers of Perl Wisdom