@letters=qw/A B C D E F/; my $len=4;
I would like to pull back all possible combinations of size 4 from this array. The extra bit is to allow resampling.
So: AAAA AAAB AAAC ---- CCFC ---- FFFF
I've come up with a couple of various ugly solutions which are hacks of other Q&As. But they're very slow (my hacks that is).
Could someone provide me with an elegant (or quick) solution. I've done searches but couldn't find this question. Please point me in the direction if it has.
thanks
james
In reply to extracting all possible n-mers from an array by gingaloon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |