in reply to Re: Trying to get sum of elements in array (map)
in thread Trying to get sum of elements in array

Or use a module.
use strict; use warnings; use List::Util qw(sum); print 'The sum is : ', sum(map {rand 50} 1..5), "\n";
Bill