Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: About List::Util's pure Perl shuffle()

by blazar (Canon)
on Jul 12, 2007 at 10:36 UTC ( #626191=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub bukNew ($) {
        my( $ref ) = @_;
        my @x = 0 .. $#$ref;
        @{ $ref }[ map splice( @x, rand @x, 1 ), @x ];
    }
    
  2. or download this
    sub bukNew (@) {
        my @x = 0 .. $#_;
        @_[ map splice( @x, rand @x, 1 ), @x ];
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (15)
As of 2014-10-21 17:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (106 votes), past polls