in reply to Arbitrary Levels Of Recursion?

Have a look at NestedLoops in Algorithm::Loops

NestedLoops( [ [ 1 .. 10 ], [ 'a' .. 'c' ], [ 'x' .. 'y' ], ], \&do_something );

Replies are listed 'Best First'.
Re^2: Arbitrary Levels Of Recursion?
by gam3 (Curate) on Apr 01, 2005 at 02:55 UTC
    The code in 444056 is equivilent to:
    for my $a ( 1 .. 10 ){ for my $b ( a .. c ){ for my $c ( x .. z ){ do_something($a, $b, $c); } } }
    -- gam3
    A picture is worth a thousand words, but takes 200K.