in reply to finding all combinations

ALgorithm::Combinatorics has everything you might ever combine.