The stupid question is the question not asked | |
PerlMonks |
Re: Generate all unique combinations of 1 and 0 using specified length of "0"-string and count of 1'sby perlfan (Vicar) |
on Sep 18, 2020 at 13:59 UTC ( [id://11121921]=note: print w/replies, xml ) | Need Help?? |
For computational efficiency, you'll want to use an "iterator" pattern. Search here, there are quite a few interesting posts about this. You can also read about them in section 4.3.1 of Dominus' Higher Order Perl. There are also quite a few CPAN modules that might help.
In Section
Seekers of Perl Wisdom
|
|