Help for this page

Select Code to Download


  1. or download this
        $_ ne ($a=int( rand( $#values-$_+1))+$_) 
        and $values[$_] ^= $values[$a] ^= $values[$_] ^= $values[$a] 
            for (0..$#values); # Fisher-Yates one-liner
    
  2. or download this
        $b ne ($a=int(rand($#values-$b+1))+$b) 
        and $values[$b] ^= $values[$a] ^= $values[$b] ^= $values[$b] 
            for $b (0..$#values);