http://www.perlmonks.org?node_id=49484


in reply to How can I add all the numbers in an array with out doing a foreach loop?

For a positive sum unpack"%123d*",pack"d*",@_
For a signed long unpack"l",pack"l",unpack"%32d*",pack"d*",@_

Originally posted as a Categorized Answer.