in reply to array combinations

Set::CrossProduct does exactly that. You have to build one loop to get the strings, though.

You can also make up something with glob.

Update: here's an example with glob:

#!/usr/bin/perl use strict; use warnings; my @l = ( [1, 2, 3], [4, 5], [6, 7] ); my $glob = join '', map {'{'. join(',', @$_). '}'} @l; local $\ = "\n"; print for glob $glob; __END__ 146 147 156 157 246 247 256 257 346 347 356 357