Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Perl : How to Create Unique String/Number?

by sleepingsquirrel (Hermit)
on Jan 27, 2005 at 19:53 UTC ( #425729=note: print w/ replies, xml ) Need Help??


in reply to Perl : How to Create Unique String/Number?

Might not be exactly what you're looking for, but maybe a place to start.

#!/usr/bin/perl -w $len = 11 + int(rand(10)); $r .= chr(48 + rand(74)) for (1..$len); $r =~ s/\W//g; print "$r\n";


-- All code is 100% tested and functional unless otherwise noted.


Comment on Re: Perl : How to Create Unique String/Number?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2015-07-28 16:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls