Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Duplicate Results from Subroutine

by dbuckhal (Chaplain)
on May 24, 2013 at 06:03 UTC ( [id://1035069]=note: print w/replies, xml ) Need Help??


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!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1035069]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-25 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found