in reply to Re: Help with arrays
in thread Help with arrays
I think I Finally figured it out =)
This worked I am not sure if it's the correct way but it gave me the average#!/usr/bin/perl use warnings; $sum = 0; @nums = (); push (@nums,(4,4)); $sum += $_ for @nums; $size = @nums; $average = $sum / $size; print "$average";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Help with arrays
by Kenosis (Priest) on Sep 22, 2012 at 06:37 UTC | |
Re^3: Help with arrays
by Kenosis (Priest) on Sep 22, 2012 at 06:42 UTC |
In Section
Seekers of Perl Wisdom