Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Surprising result when using undef

by swl (Parson)
on Feb 22, 2021 at 20:55 UTC ( [id://11128667]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use 5.010; 
    my $is_dev_mode = $param->{is_dev_mode} // 1;
    
  2. or download this
    my $is_dev_mode = defined $param->{is_dev_mode} ? $param->{is_dev_mode
    +} : 1;
    
  3. or download this
    #  it would likely help your future self to add a comment here if you 
    +do this
    my $is_dev_mode = !!$param->{is_dev_mode} || 0;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-25 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found