If you don't mind using 128 bits rather than 32, Data::UUID guarantees that you won't get duplicates, ever.
use Data::UUID; use constant IDGenerator => Data::UUID->new(); sub new_sid { IDGenerator->create() }
Update: Duh, they're both the same size, 128 bits and 32 hex digits.
In reply to Re: MD5-based Unique Session ID Generator
by simonm
in thread MD5-based Unique Session ID Generator
by radiantmatrix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |