in reply to Misprinting combinations / iterator

I haven't used this particular module, but from looking at the documentation.. $combination is a reference to an array (an arrayref) - that needs to be deferenced. print "@$combination\n"; looks like what you need.

Replies are listed 'Best First'.
Re^2: Misprinting combinations / iterator
by blacknail (Initiate) on Mar 27, 2012 at 16:03 UTC

    You're right, Marshall! Thank you all for your kind and quick answers! :]

      The examples in the module's docs weren't completely explanatory - I can see how this was confusing!

      There is a "core" module (meaning that is pre-installed and exists on all Perl installations), Data::Dumper. It can print a representation of any Perl data structure - WOW! You need to give it a reference to the structure.

      This is fantastic debugging tool.
      There is no equivalent in 'C' or 'Java' of which I am aware.

      use Data::Dumper; # in your loop put... print Dumper \$combination;