How about as a subroutine?
sub sumit { my $sum = 0; $sum += pop // return $sum while 1; }
In reply to Re: How can I add all the numbers in an array with out doing a foreach loop?
by textral
in thread How can I add all the numbers in an array with out doing a foreach loop?
by draco_iii
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |