in reply to use warnings is complaining

Check for empty string and substitute a number instead:
$inc ||= 0; $exp ||= 0;
Those expressions transform to $var = $var || 0; and $var is false when it's zero-ish, undef or an empty string. When it's zero, we're not changing anything; we should not get undef in this program; and the empty string the cause of this warning, which we're replacing with 0.