in reply to Combinations of multiple arrays
Or as an iterator:use Algorithm::Loops qw( NestedLoops ); NestedLoops(\@list, sub { print(join(',', @_), "\n"); }, );
use Algorithm::Loops qw( NestedLoops ); my $i = NestedLoops(\@list); while (my @set = $i->()) { print(join(',', @set), "\n"); }
Update: Fixed capitalization typo mentioned in reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Combinations of multiple arrays
by Anonymous Monk on Sep 08, 2020 at 21:34 UTC | |
by ikegami (Patriarch) on Sep 09, 2020 at 04:02 UTC |