Can you give us more information, is it a web application, are you using session variables, are you running this on *nix, Windows etc etc
Depending on your situation, there are a number of variables you can use to create faceted codes,(time, process id, session key(random)) which could then be passed to a function to create a totally random id.
Sounds like you need a GUID. Or a UUID. Googling 'perl guid' turns up module Data::UUID which generates 128-bit UUIDs in a number of formats. This will give you a string that looks similar to
Code:
4162F712-1DD2-11B2-B17E-C09EFE1DC403
Haven't tried it, but most other systems (.NET, Java) use them so they should be OK for your purposes.
Allegedly they are guaranteed to be unique until the year 3400, by which time you will probably have rolled off the project...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.