in reply to simultaneously adding and multiplying numbers in a hash/ array

The following will accumulate the product every time through the loop.
$product += $v1*$k1
Assignment Operators
  • Comment on Re: simultaneously adding and multiplying numbers in a hash/ array
  • Download Code

Replies are listed 'Best First'.
Re^2: simultaneously adding and multiplying numbers in a hash/ array
by derpp (Acolyte) on Aug 09, 2010 at 21:22 UTC
    Thanks! I can't believe the answer was so simple..