in reply to
extracting all possible n-mers from an array
That there is a job for either Math::Combinatorics or Algorithm::Combinatorics from CPAN. It seems the latter is more effecient but I suggest a quick benchmark on both.
Comment on
Re: extracting all possible n-mers from an array
In Section
Seekers of Perl Wisdom