Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

(ar0n: Algorithm::Numerical::Shuffle) Re: Randomize an array

by ar0n (Priest)
on Sep 08, 2000 at 00:07 UTC ( #31465=note: print w/replies, xml ) Need Help??


in reply to Randomize an array

Algorithm::Numerical::Shuffle

I'm not sure if it's the fastest, but it is the easiest:
use Algorithm::Numerical::Shuffle qw(shuffle); @shuffled = shuffle (1, 2, 3, 4, 5, 6, 7);

-- ar0n (just another perl joe)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2019-05-24 18:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (151 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!