http://www.perlmonks.org?node_id=659992

b4swine has asked for the wisdom of the Perl Monks concerning the following question:

I used the String::Combination package, downloaded from the ActivePerl site, and got what appear so plainly like a bug that I believe I must be wrong somewhere in my understanding. The code
use String::Combination qw(combination); my @comb = combination('12345678',8); print "@comb[6..12]\n@comb[62..68]\n";
produces the output
23456781 32456781 34256781 34526781 34562781 34567281 34567821 23456781 32456781 34256781 34526781 34562781 34567281 34567821
As far as I see it, there should not be any repetitions. Am I misunderstanding something, or is this a bug?