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

Re: Can I multiply corresponding numbers in two arrays together?

by rajib (Novice)
on Aug 20, 2002 at 17:47 UTC ( [id://191533]=note: print w/replies, xml ) Need Help??


in reply to How do I multiply the corresponding elements in two arrays together?

@product; $i = 0; if ($#Arr1 == $#Arr2) { foreach(@Arr1) { $product = $_ * $Arr2[$i]; ++$i; } } else { print "Do you really want to multiply unequal length of arrays?\n"; }

Originally posted as a Categorized Answer.

Log In?
Username:
Password:

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

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

    No recent polls found