Help for this page

Select Code to Download


  1. or download this
    use Games::Cards::Poker;
    
    ...
                                    ScoreHand(@{$hands[$players]}));
      }
    
  2. or download this
    #!/usr/bin/perl
    @userinput = <STDIN>;
    #What i will type e.g.: As,Qc,Td,6c,3h
    $score = ScoreHand(@userinput);
    
  3. or download this
    sub ScoreHand { # returns the score of the passed in @hand or ShortHan
    +d
      my @hand = @_; return(7462) unless(@hand == 1 || @hand == 5); my $sh
    +rt;
    ...
      if(  $slow      ) { return(SlowScoreHand($shrt)); }
      else              { return(        $zdnh{$shrt}); }
    }