Help for this page

Select Code to Download


  1. or download this
    use Algorithm::Loops qw( NestedLoops );
    
    ...
       NestedLoops(\@_, sub { push(@rv, [ @_ ]); });
       return \@rv;
    }
    
  2. or download this
    my $comb = comb([qw(a b c)],[qw(1 2 3)],[qw(- + *)]);
    
    ...
    ));
    
    print(scalar(@$comb), "\n");  # 27
    
  3. or download this
    sub comb {
       my @idx = map { 0    } @_;
    ...
          }
       }
    }