in reply to Re: Combinatorics problem
in thread Combinatorics problem

The code above contains a bug - it returns an empty list when no arguments are given, but it should return a reference to an empty list. Fixing the bug also means the code can be shortened:
say"@$_"for(*_=sub{@_?map{my$x=$_;map{[$x,@$_]}_(@_[1..$#_])}@{$_[0]}: +[]})->([1,2],["a","b"],["#","*","&"]);