You might want to consider using Data::UUID.
In reply to Re: Need to Generate Unique String by adrianh in thread Need to Generate Unique String by EchoAngel