in reply to Re^2: All possible number combinations in perl
in thread All possible number combinations in perl

That isn't all the combinations:

[0] Perl> for $k ( 1 .. 5 ) { $i = combinations( [ 1..5 ], $k ); print + @$_ while defined( $_ = $i->next ) };; 1 2 3 4 5 1 2 1 3 1 4 1 5 2 3 2 4 2 5 3 4 3 5 4 5 1 2 3 1 2 4 1 2 5 1 3 4 1 3 5 1 4 5 2 3 4 2 3 5 2 4 5 3 4 5 1 2 3 4 1 2 3 5 1 2 4 5 1 3 4 5 2 3 4 5 1 2 3 4 5

It may be what you want, but if it is, then you aren't after combinations.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?