in reply to Incremental indexing exponential

Variable number of nested loops begs for Algorithm::Loops's NestedLoops.
use Algorithm::Loops qw( NestedLoops ); for my $depth (2..3) { NestedLoops( [ ([ 0..3 ]) x $depth ], sub { print(join(', ', @_), "\n"); }, ); }

Replies are listed 'Best First'.
Re^2: Incremental indexing exponential
by FFRANK (Beadle) on Jun 21, 2007 at 15:59 UTC
    Thanks ikegami, this works excellent. NestedLoops again :-)