in reply to Generating all 5-card hands
but it's not a truly iterative solution (it generates the whole set before beginning iteration). Consider Algorithm::Loops, or Iterating over combinations (found by Super Searching on combinations and iterator).print "$_\n" while $_=glob '5,{A,2,3,4,6,7,8,9,10,J,Q,K}' .',{A,2,3,4,5,6,7,8,9,10,J,Q,K}'x3;
|
---|