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


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*", @numbers);

For a signed long:

unpack "l", pack( "l", unpack( "%32d*", pack( "d*", @numbers)));