[sf-perl] Odd behavior for dot operator?
ASIGMUND at altera.com
Fri Mar 18 11:30:25 PDT 2011
I believe that it was not equivalent in my context:
- I wanted to include _something_ (the value of $y itself or the text "undef") in my print statement.
- I wanted to eliminate the "Use of uninitialized value" warning under perl -w.
I'm still a relative perl newbie, so any correction is welcome.
From: sanfrancisco-pm-bounces+asigmund=altera.com at pm.org [mailto:sanfrancisco-pm-bounces+asigmund=altera.com at pm.org] On Behalf Of Bill Moseley
Sent: Friday, March 18, 2011 11:18
To: San Francisco Perl Mongers User Group
Subject: Re: [sf-perl] Odd behavior for dot operator?
On Fri, Mar 18, 2011 at 10:50 AM, Quinn Weaver <quinn at fairpath.com<mailto:quinn at fairpath.com>> wrote:
Note also that this code snippet is equivalent to $y:
(defined $y)? $y :'undef'
If $y is not defined, then it's undef, by (if you'll pardon me) definition.
Isn't is 'undef'? not undef?
moseley at hank.org<mailto:moseley at hank.org>
This message may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any use, disclosure, dissemination, distribution, or copying of this message, or any attachments, is strictly prohibited. If you have received this message in error, please advise the sender by reply e-mail, and delete the message and any attachments. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SanFrancisco-pm