Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: How do I multiply the corresponding elements in two arrays together?

by Fang (Pilgrim)
on Sep 09, 2005 at 21:00 UTC ( [id://490753]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use List::MoreUtils qw/pairwise/;
    @a = (1..5);
    @b = (6..10);
    ...
    print join ", ", @x;
    __END__
    6, 14, 24, 36, 50
    
  2. or download this
    use List::MoreUtils qw/pairwise/;
    @a = (1..5);
    ...
    print join ", ", @x;
    __END__
    6, 14, 24, 0, 0
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-23 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found