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


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?

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.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,