in reply to How do I get all n element subsets of an array
Algorithm::Permute, Set::Scalar, Set::IntSpan, and Bit::Vector might prove useful. Don't reinvent the wheel!