yuri123 has asked for the wisdom of the Perl Monks concerning the following question:
Given a list of array refs like:
my @list = ([0..1], [2..4], [5..8]);
I want to generate all possible sets (triples in this case) each set containing one element of each array :
0,2,5 1,2,5 0,3,5 1,3,5 ...
I spent a day trying to no avail. I wonder if somebody already solved this problem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Combinations of multiple arrays
by ikegami (Patriarch) on Jan 15, 2010 at 06:05 UTC | |
by Anonymous Monk on Sep 08, 2020 at 21:34 UTC | |
by ikegami (Patriarch) on Sep 09, 2020 at 04:02 UTC | |
|
Re: Combinations of multiple arrays
by ikegami (Patriarch) on Jan 15, 2010 at 06:15 UTC | |
|
Re: Combinations of multiple arrays
by fod (Friar) on Jan 15, 2010 at 05:18 UTC | |
|
Re: Combinations of multiple arrays
by tybalt89 (Monsignor) on Sep 08, 2020 at 22:48 UTC | |
by thomas895 (Deacon) on Sep 09, 2020 at 03:42 UTC | |
|
Re: Combinations of multiple arrays
by Anonymous Monk on Jan 15, 2010 at 05:10 UTC | |
|
Re: Combinations of multiple arrays
by Fletch (Bishop) on Jan 15, 2010 at 14:09 UTC | |
|
Re: Combinations of multiple arrays
by doug (Pilgrim) on Jan 15, 2010 at 21:19 UTC |