Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Adding and Multplying Elements in an Array

by monsieur_champs (Curate)
on Jun 18, 2003 at 14:58 UTC ( [id://266853]=note: print w/replies, xml ) Need Help??


in reply to Adding and Multplying Elements in an Array

Hello, little fellow.

Homework, hum? So I think you shall live by the Perl Motto "There Is More Than One Way To Do It tm". I use map to do it: map $sum+=$_, @even; and map $mul*=$_, ($sum=1),@odd;

I'm posting this as a motivation for you try to figure "Yet Another Way To Do It tm". Please consider my proposal serioulsly.

May the gods bless you.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Just Another Perl Monk

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-20 07:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found