Is this what you are after?
#! perl -slw use strict; use Algorithm::Combinatorics qw[ combinations ]; my @total = ( "1-S","2-S","3-S","4-S","5-S","6-S","7-S","8-S","9-S","10-S","11-S","1 +2-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","1 +2-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","1 +2-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","1 +2-K","13-K","14-K" ); my $iter = combinations( [0..55], 5 ); print join ' ', @total[ @$_ ] while defined( $_ = $iter->next ); __END__ C:\test>junk2 1-S 2-S 3-S 4-S 5-S 1-S 2-S 3-S 4-S 6-S 1-S 2-S 3-S 4-S 7-S 1-S 2-S 3-S 4-S 8-S 1-S 2-S 3-S 4-S 9-S 1-S 2-S 3-S 4-S 10-S 1-S 2-S 3-S 4-S 11-S 1-S 2-S 3-S 4-S 12-S 1-S 2-S 3-S 4-S 13-S 1-S 2-S 3-S 4-S 14-S 1-S 2-S 3-S 4-S 1-H 1-S 2-S 3-S 4-S 2-H 1-S 2-S 3-S 4-S 3-H 1-S 2-S 3-S 4-S 4-H ...
If so, then your calculation is wrong. It results in 3.8 million combinations, not the 458 million that your calculation would produce.
In reply to Re: How to get all combinations
by BrowserUk
in thread How to get all combinations
by robertw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |