Help for this page

Select Code to Download


  1. or download this
    sub pick_one
      {
    ...
            return $i if(rand(1) <= 1/($to-$i+1));
          }
      }
    
  2. or download this
    sub pick_n
      {
    ...
          }
        return @picked;
      }
    
  3. or download this
    my(@counts);
    
    ...
      {
        print "Count[$c] = $counts[$c]\n";
      }
    
  4. or download this
    Count[0] =
    Count[1] = 29974
    ...
    Count[8] = 30092
    Count[9] = 29830
    Count[10] = 30028