in reply to Generate unique ids of maximum length

I use String::Random when wanting to create randomly generated identifiers. I like the randregex method - which takes a regex and will generate a random string that will conform to the regex.

This doesn't solve the problem you are - but I thought you/others may find it useful for solving this type of problem.

It also doesn't verify that the id is unique among others, but that can be accomplished trivially using a hash with the identifiers as keys.

  • Comment on Re: Generate unique ids of maximum length