in reply to Finding Combinations of Pairs

FYI: The act of combining n-words into groups is covered in Math::Combinatorics where n-choose-k (nCk) is implemented by combine(). In the case of the OP, it is a two-word combination n-choose-2.

Re: How can I calculate the right combination of postage stamps? (combinatoric n Choose k with conditions)