Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Answer: How do I shuffle an array?

by gmpassos (Priest)
on Jun 16, 2003 at 03:31 UTC ( [id://266104]=note: print w/replies, xml ) Need Help??


in reply to Re: How do I shuffle an array?
in thread How do I shuffle an array?

Independet way:
my @data = 0..51; my @cards = sort { (-1,1)[rand(2)] } @data ;

Graciliano M. P.
"The creativity is the expression of the liberty".

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-20 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found