in reply to Modulus zero error
I was just getting this error yesterday and it was making me crazy. I was doing this at the start of my script.
my $x = undef;
Not realizing that the error was telling me $x needs to be something. I changed it from undef to 0 and that fixed it. Thinking back, trying to do the operation on an undefined variable was dumb, but I didn't "see" it.