Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Help with arrays

by Kenosis (Priest)
on Sep 22, 2012 at 06:37 UTC ( #995058=note: print w/replies, xml ) Need Help??


in reply to Re^2: Help with arrays
in thread Help with arrays

Yes--well done!

...I am not sure if it's the correct way...

Tim Toady!

If I may, however, offer the following for you to consider:

#!/usr/bin/perl use strict; use warnings; my $sum = 0; my @nums = (); push( @nums, ( 4, 8 ) ); $sum += $_ for @nums; my $size = @nums; my $average = $sum / $size; print "$average";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995058]
help
Chatterbox?
[SuicideJunkie]: Helps that the top level directories are people's names ;) But the nested rectangles make it easy to spot wasted space when it is lots of small stuff or a few big things.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2017-09-20 17:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (237 votes). Check out past polls.

    Notices?