in reply to Re: Generating lists of strings
in thread Generating lists of strings
That looks like a lot like the implementation of NestedLoop. Might as well use it.
use Algorithm::Loops qw( NestedLoops ); my @digits = (1..3); NestedLoops( [ (\@digits) x 4 ], sub { print( @_, "\n" ); }, );
Update: In addition to the above, this node originally said that BrowerUk's output was wrong and had code to fix the problem, but I was looking at a reply that produced incorrect output, not the OP. The incorrect version was removed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Generating lists of strings
by BrowserUk (Patriarch) on Jan 24, 2010 at 19:51 UTC | |
by ikegami (Patriarch) on Jan 24, 2010 at 21:53 UTC | |
by BrowserUk (Patriarch) on Jan 24, 2010 at 22:38 UTC | |
by ikegami (Patriarch) on Jan 24, 2010 at 22:48 UTC | |
by BrowserUk (Patriarch) on Jan 24, 2010 at 23:08 UTC | |
| |
by BrowserUk (Patriarch) on Jan 25, 2010 at 01:16 UTC | |
by BrowserUk (Patriarch) on Jan 25, 2010 at 00:56 UTC | |
by ikegami (Patriarch) on Jan 25, 2010 at 02:54 UTC | |
by BrowserUk (Patriarch) on Jan 25, 2010 at 03:07 UTC | |
|