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


in reply to Sum of N elements in an M element array

To generate all the possible 1,2,3,4,5 combinations, you could use subsets of Algorithm::Combinatorics