We don't bite newbies here... much | |
PerlMonks |
Re: Answer: How can I add all the numbers in an array with out doing a foreach loop?by choroba (Cardinal) |
on Mar 09, 2017 at 17:00 UTC ( [id://1184056]=note: print w/replies, xml ) | Need Help?? |
This is very ineffective way of counting the sum. Try adding 100000000 into the array. What your solution does is it creates ranges 1 .. $_ for each number in the list, and then counts how many members the whole sequence has.
In Section
Seekers of Perl Wisdom
|
|