http://www.perlmonks.org?node_id=1016745


in reply to Custom-length random/unique string generator

Using the process id for your random number doesn't look like a good idea.

PIDs get reused so they're not unique and can be a very small value.

It's a bit better to make a string from the date time plus other info then hash that.

Or as other people have said, it's a lot better to use an existing module :)