in reply to Re: Illegal division by zero error
in thread Illegal division by zero error
Yes, line 15 is a division:
$ratio = $array[3] / $array[4];The division it is attempting is essentially "zero" because it's attempting to process an empty line after the end of the file.
I am not sure what is actually the issue - although I think it may be the issue I specified in the OP - if so, i'm not entirely sure how to compensate for the splitting of lines. I did try to essentially offset $. myself by subtracting '1' from it everytime the elseif loop criteria is met but the error is still returned.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Illegal division by zero error
by Corion (Patriarch) on Feb 01, 2016 at 16:38 UTC | |
by TJCooper (Beadle) on Feb 01, 2016 at 16:51 UTC | |
by Corion (Patriarch) on Feb 01, 2016 at 16:56 UTC | |
by TJCooper (Beadle) on Feb 01, 2016 at 17:03 UTC | |
by Corion (Patriarch) on Feb 01, 2016 at 17:50 UTC |