Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Is there a better way to generate unique set of random numbers ?

by pid (Monk)
on Jul 29, 2011 at 07:46 UTC ( [id://917398]=note: print w/replies, xml ) Need Help??


in reply to Is there a better way to generate unique set of random numbers ?

In case you want a oneliner to solve this, here I paste one that I came up with :)

$ perl -le '@a{map{int rand 1185}(1..10)}=();print for keys %a' 373 304 286 210 816 777 596 18 766 880

  • Comment on Re: Is there a better way to generate unique set of random numbers ?
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2026-05-10 20:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.