That's a cross product, not listing permutations or combinations.
It's trivial with Algorithm::Loops's NestedLoops.
use Algorithm::Loops qw( NestedLoops ); my @array1 = qw( A B ); my @array2 = qw( 1 2 ); my @array3 = qw( C D E ); my $iter = NestedLoops([ \@array1, \@array2, \@array3, ]); while (my @row = $iter->()) { print("@row\n"); }
In reply to Re: Factorial Matrix
by ikegami
in thread Factorial Matrix
by isutommyt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |