Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: How can I add all the numbers in an array with out doing a foreach loop?

by ack (Deacon)
on Nov 09, 2009 at 20:32 UTC ( [id://806013]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    my @nums = (1,2,3,4,5);
    ...
    
    print "\$sum = $sum\n";
    
  2. or download this
    
    $sum = 15
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-25 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found