in reply to Generating combinatorial strings

Algorithm::Loops to the rescue:
use strict; use warnings; use 5.010; use Algorithm::Loops qw(NestedLoops); NestedLoops [([1..3]) x 5], sub { say @_ };
If the lists may have different lengths, all you have to do is change the first argument to NestedLoops:
NestedLoops [[1..3], [1..5], [1..3]], sub { say @_ };

(use 5.010; is only required for say, not for NestedLoops).

tye++ for such a useful module.

Perl 6 - links to (nearly) everything that is Perl 6.