Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Generate unique ids of maximum length

by jeffreyray (Sexton)
on Apr 12, 2010 at 18:14 UTC ( [id://834334]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://834334]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-18 06:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found