Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Generating all 5-card hands

by TedPride (Priest)
on May 18, 2005 at 18:37 UTC ( #458380=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
        my @cards = split / /, "5$_[0]";
        # Do whatever with @cards;
    }
    
  2. or download this
    @_ = (2..4,6..9,'A');
    comb('', 4, @_,@_,@_,@_);
    
  3. or download this
    comb('', 4, 2..4,6..9,'A');
    
  4. or download this
    use strict;
    use warnings;
    ...
    }
    
    sub sum { my $n; $n += $_ for @_; return $n; }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://458380]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2014-09-20 04:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (152 votes), past polls