Dear perl monks, I am sorry to post this second question so rapid after the first, i am dying to know the answer to this one as well: i am trying to perceive Games::Cards::Poker, understand it to some extent . I want to have an array that has all possibilities of 56*55*54*53*52, I want to have every single combination of 5 cards out of 56
my @total = ("1-S","2-S","3-S","4-S","5-S","6-S","7-S","8-S","9-S","10-S","11-S","12-S","13-S","14-S","1-H","2-H","3-H","4-H","5-H","6-H","7-H","8-H","9-H","10-H","11-H","12-H","13-H","14-H","1-R","2-R","3-R","4-R","5-R","6-R","7-R","8-R","9-R","10-R","11-R","12-R","13-R","14-R","1-K","2-K","3-K","4-K","5-K","6-K","7-K","8-K","9-K","10-K","11-K","12-K","13-K","14-K");
I got the perl module Set::CrossProduct but i don't know how to utilize it in such a way that I get 56*55*54*53*52 combinations of 5 cards in one array, the problem i think is that i can make it choose an item out of five lists but then it would choose the same item twice since i cant delete one out of the second list it has to go through since it chooses a different item every time. Could someone maybe tell me how to do this particular thing with this module or recommend another one? Thank you so much in advance
In reply to How to get all combinations by robertw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |