in reply to Uninitialized value in division and Illegal division by zero fix

You are getting the error in line 61 because the denominator is zero, and division by zero is not defined (see the "Proof that 2 = 1" for example).

The fix is to either:

  1. Check the denominator and skip the calculation if you are going to have a divide-by-zero.
  2. Debug the code and determine why $total_mono{$k} is not getting updated like you think it ought to be.

----
I Go Back to Sleep, Now.

OGB

  • Comment on Re: Uninitialized value in division and Illegal division by zero fix
  • Download Code