in reply to finding values in an array that add up to a specific number

interesting. I don't know about an existing module, but here are some ideas for your search algorithm:
Assuming you want x number of elements in array that add up to y
sub searchLoop { - pass in: - target number (y) - number of elements desired (x) - the array (array) - y offset number (offset, starts at 0) - sort array in descending numerical order and store that into a tempo +rary array that you can mess with. - remove entries in the temp array that are larger than y - foreach ( unshift a value off temp array into z) remaining entry: - if z = y, print z+offset as a solution (or return it if you only n +eed one solution) - run searchLoop(y-z, x-1, temp (with the z element removed), offset ++z) }

This is a very rough sketch, but it should get you started.
- paul