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?

Just for fun, does the question make any sense?
use List::Util qw/reduce/; my $sum = reduce { $a + $b } 1..10;
Boris
  • Comment on Re: Answer: How can I add all the numbers in an array with out doing a foreach loop?
  • Download Code