Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: use warnings is complaining

by Anonymous Monk
on Aug 15, 2018 at 13:46 UTC ( #1220375=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1220375]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2022-01-18 07:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (52 votes). Check out past polls.

    Notices?