Those are permutations, not combinations. Order doesn't matter for combinations.
Algorithm::Loops has a function called NextPermute which iterates permutations. Taken almost verbatim from the documentation:
use Algorithm::Loops qw( NextPermute ); my @list = sort qw( a b c ); do { print(join(', ', @list), "\n"); } while (NextPermute(@list));
In reply to Re: generate combinations of lists
by ikegami
in thread generate combinations of lists
by gpm1982
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |