my $i = Integer::Partition->new(6); while (my $p = $i->next) { print join( ' ', @$p ), $/; }