Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Re: Parsing your script's command line

by Not_a_Number (Prior)
on Sep 04, 2003 at 20:17 UTC ( [id://289002]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Parsing your script's command line
in thread Parsing your script's command line

Er...

I'm afraid I don't understand. Under what circumstances does:

$thing = 'default' unless defined $thing;

not work for $thing == 0? I'm confused. Could you show me some code where the behaviour of the above differs from:

$thing ||= 'default' unless defined $thing;

Thanks in advance,

dave

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-09-16 20:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (22 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.