Help for this page

Select Code to Download


  1. or download this
    # randomize, via Fisher-Yates
    @array[-$i,$j] = @array[$j,-$i] while $j = rand(@array - $i), ++$i < @
    +array;
    
  2. or download this
    @no_repeats = do { my %h; grep !$h{$_}++, @with_repeats };