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

Using eval, which of course has inherent dangers:
@e = (1,2,3,4); $sum = eval join '+', @e;
  • Comment on Re: How can I add all the numbers in an array with out doing a foreach loop?
  • Download Code