Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by ysth (Canon)
on Aug 16, 2006 at 00:07 UTC ( [id://567570]=note: print w/replies, xml ) Need Help??


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

Yes, the answer then is, "you can also use a for loop".
No, the Scalar::Util author is doing a (C, not Perl) for loop. The "I" of the "How can I..." question is only doing sum().
However, when the XS fails to load, a plain foreach is used again.
Ditto.
  • Comment on Re^2: Answer: How can I add all the numbers in an array with out doing a foreach loop?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2024-04-23 12:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found