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
In Section
Seekers of Perl Wisdom
in reply to Sum of N elements in an M element array