http://www.perlmonks.org?node_id=961960


in reply to Misprinting combinations / iterator

The $combination variable returned by the iterator is an array reference, so you need to de-reference it in order to print. The following will print each combination on a line, with each element separated by a tab character:
print $output join("\t",@{$combination}) . "\n";
The @{ } construct is what de-references the array reference

Replies are listed 'Best First'.
Re^2: Misprinting combinations / iterator
by blacknail (Initiate) on Mar 27, 2012 at 16:01 UTC
    Thanks for the explanation, tangent :]