http://qs321.pair.com?node_id=1198515


in reply to Faster alternative to Math::Combinatorics

Great, now I'm going to have Pie Iesu Domine running through my head all day. What you are looking for is "combinations with repetition", and Algorithm::Combinatorics has it.