Besides brevity, it might also execute faster since Util.xs informs us that sum() is coded in C, as NV sum(...)
use List::Util qw(sum); print sum (my @arr = qw( 1 3 5 6));
In reply to Re: Golf: Adding up array elements
by ioannis
in thread Golf: Adding up array elements
by kwaping
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |