Help for this page

Select Code to Download


  1. or download this
    @a = split /\s+/, join " ",
      ("1 " x 8, "2 " x 1, "3 " x 1);
    print $a[int(rand 10)];
    
  2. or download this
    my %wheel = {"One" => 8, "Two" => 1, "Three" => 1};
    my $sum;
    ...
      $sum-=$wheel{$item};
    }
    print "$item was picked\n";