Help for this page

Select Code to Download


  1. or download this
    my $people = 10;
    my $prizes = 8;
    my $draws = 22*2;
    
  2. or download this
    our $people = (shift or 10);
    our $prizes = (shift or 8);
    our $draws = (shift or 22*2);
    
  3. or download this
    our $people = 10;
    our $prizes = 8;
    ...
    
        # etc.
    }
    
  4. or download this
    use Getopt::Declare;
    our $PEOPLE_OPT = '-p';
    ...
    
    my $options = Getopt::Declare->new( $option_spec )
      or die "\n**** Error processing command line options, terminating $0
    +\n";
    
  5. or download this
        for (0..($draws-1)){
        local $_ = $seq[$_];
    
  6. or download this
        for (@seq[0..$draws-1]){
    
  7. or download this
        for my $draw (@seq[0..$draws-1]){
    
  8. or download this
        my $winstring = $b[$j].' '.$i[$j].' '.$n[$j].'
    + '.$g[$j].' '.$o[$j]."\n";
    
  9. or download this
        my $winstring = "$b[$j] $i[$j] $n[$j] $g[$j] $o[$j]\n";
    
  10. or download this
    sub getRand(){
        while (1){
    ...
        unless ($temp = 0) {return $temp; exit}
        }
    }
    
  11. or download this
        my $temp = int(rand(100)+1;
    
  12. or download this
        {return $temp; exit}
    
  13. or download this
        &doInit;
        &mkCards;
    
  14. or download this
        doInit();
        mkCards();
    
  15. or download this
        $status = getRand + 17;
    
  16. or download this
        if (m,([01]{10})\n((?:(?:\w\-\d+[\s\n]){5}){5}
    +),)
    
  17. or download this
        local *getNewDrawBall = sub { #workaround for 
    +scoping inner subroutine with typeglob - ugly Per
    ...
    +int "DEBUGdraw: $temp\n";
            }
        };
    
  18. or download this
    { # closure for getNewDrawBall, getNewNonDrawBall
      my %seen;
    ...
        # stuff here
      }
    } # end closure for getNewDrawBall, getNewNonDrawBall
    
  19. or download this
        for my $k (1..$losers)
        {
    ...
            #SPOIL CARD HERE
            # etc...
        }
    
  20. or download this
        local *coinFlip = sub {
            my $z = &getRand;
            my $coin = int($z)% 2;
            return $coin;
        };