Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: Parsing error

by kcott (Archbishop)
on Jan 31, 2023 at 19:06 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-26 06:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found