in reply to Re: Combinations / permutations... not even sure what this is called
in thread Combinations / permutations... not even sure what this is called
If the N is dynamic, one can use Algorithm::Loops's NestedLoops.
use Algorithm::Loops qw( NestedLoops ); my @arrays = ( [qw( red blue )], [qw( sm med lrg )], [ 1..4 ], ); NestedLoops( \@arrays, sub { print(join('-', @_), "\n"); }, );
|
|---|