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

List::Util also has a sum():
use List::Util 'sum'; @a = 1..10; $sum = sum(@a);
  • Comment on Re: Answer: How can I add all the numbers in an array with out doing a foreach loop?
  • Download Code