in reply to Re: Re: illegal division by zero
in thread illegal division by zero

THAT looks good, but consider answer fron Caron:
you are using
$exposures ^

(plural) which is probably not defined.
You should definitely use
use strict;