Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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 lurking in the Monastery: (11)
As of 2014-07-30 03:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls