Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Arrow Operator Question

by sectokia (Pilgrim)
on Mar 27, 2023 at 08:41 UTC ( #11151247=note: print w/replies, xml ) Need Help??


in reply to Re: Arrow Operator Question
in thread Arrow Operator Question

Thanks. The reason I had undef was the style I generally use is more like this:

if ($foo == ($bar->{c}{d}{e}//'moo')) { ... }

Replies are listed 'Best First'.
Re^3: Arrow Operator Question
by kcott (Archbishop) on Mar 27, 2023 at 10:14 UTC
    "if ($foo == ($bar->{c}{d}{e}//'moo')) { ... }"

    You may have typed that in a hurry. While I do follow the gist of what you're saying, I do hope you're aware that '==' is used for numbers (e.g. 300) and 'eq' is used for strings (e.g. "moo"). See "perlop: Equality Operators" for more complete details.

    — Ken

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2023-09-23 20:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?