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


in reply to Duplicate Results from Subroutine

Looks like they got you taken care of, so I thought I would pass a little tip about finding array size
sub avg { my $len1 = $#numlist + 1; return total(@numlist) / $len1; }
You can get the array length by this:
my $len1 = @numlist;
... which is the scalar value of your array, which is the size.

Enjoy Learning Perl!