in reply to Null values in Perl Calculation

Syphilis has identified a special case where this average does not exist. tybalt89 proposed a solution which avoids the error by bypassing the calculation. With this correction, your existing code would output a numeric zero. This may be a problem for your users because they could not tell the difference between an average of zero and no average. I recommend that you ask them what they would prefer. Other possible choices include: Except for the first, you could use
$baverage = $baverage1 ? $rec{'BatterRuns'} / $baverage1 : '*****';
Bill