XP is just a number | |
PerlMonks |
Re: use warnings is complainingby Anonymous Monk |
on Aug 15, 2018 at 13:46 UTC ( [id://1220375]=note: print w/replies, xml ) | Need Help?? |
Check for empty string and substitute a number instead:
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.
In Section
Seekers of Perl Wisdom
|
|