in reply to Which Permute or other module can give me all possible subsets of 6 numbers out of 40?
#!/usr/bin/perl # http://perlmonks.org/?node_id=1212655 use strict; use warnings; my $draw = 2; my $from = 3; my $pattern = '(2+?)' x $draw; (2 x $from) =~ /^$pattern(??{print "@+[1..$draw]\n"})/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Which Permute or other module can give me all possible subsets of 6 numbers out of 40?
by choroba (Cardinal) on Apr 11, 2018 at 11:10 UTC | |
by tybalt89 (Monsignor) on Apr 11, 2018 at 13:28 UTC | |
by choroba (Cardinal) on Apr 11, 2018 at 13:33 UTC |