Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Parsing error

by kcott (Archbishop)
on Jan 31, 2023 at 19:06 UTC ( #11150058=note: print w/replies, xml ) Need Help??


in reply to Re^2: Parsing error
in thread Parsing error

Do note that "! defined $var" is not the same as "! $var".

$ perl -Mstrict -wE ' my $x; say "\$x not defined: ", (! defined $x) ? "Y" : "N"; say "\$x not TRUE: ", (! $x) ? "Y" : "N"; $x = 0; say "\$x not defined: ", (! defined $x) ? "Y" : "N"; say "\$x not TRUE: ", (! $x) ? "Y" : "N"; $x = 1; say "\$x not defined: ", (! defined $x) ? "Y" : "N"; say "\$x not TRUE: ", (! $x) ? "Y" : "N"; ' $x not defined: Y $x not TRUE: Y $x not defined: N $x not TRUE: Y $x not defined: N $x not TRUE: N

— Ken

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (1)
As of 2023-03-31 03:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (74 votes). Check out past polls.

    Notices?