http://qs1969.pair.com?node_id=11151247


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