sub nested(&@) { my $cb = shift; NestedLoops(\@_, $cb); } local $, = ", "; local $\ = "\n"; nested { print @_; } @lists;