in reply to Permutations question
use Algorithm::Loops qw( NestedLoops ); my $iter= NestedLoops( [ [1], [ 2, 3, 4 ], [5], [ 6, 7, 8 ], [9] ], ); my @perms; while( @perms = $iter->() ) { print @perms, "\n"; }
-Mark
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Permutations question (non-iter)
by tye (Sage) on Feb 22, 2005 at 17:25 UTC |