August 10th, 2012, 11:50 AM
Alphanumeric number generator
hey guys, does anyone knows how can i generate an alphanumeric unique number each time i execute my script?
is there any ready script for that?
August 10th, 2012, 01:48 PM
Check simply the time function. It returns the number of seconds since January 1, 1970.
This guaranteed to be unique each time you run your script (unless you run it several times per second).
$ perl -e "print time"
August 10th, 2012, 03:02 PM
You could use Data::UUID.
This will generate unique values even when running multiple times a second and guarantees unique values until 3400 AD.
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo