[sf-perl] Odd behavior for dot operator?
ASIGMUND at altera.com
Thu Mar 17 22:55:58 PDT 2011
First, I realize that I can (& should) use "join" for something like this, and "join" behaves as I expect here. Nevertheless, I'm interested to get an explanation for this behavior:
# baseline code
$x = (defined $y)? $y :'undef' ."\n";
undef # This is what I expect.
# a minor change
$x = 'a' . (defined $y)? $y :'undef' ."\n"; # now I try to put something up front
Use of uninitialized value $x in print at - line 4. # and I get slapped.
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.
More information about the SanFrancisco-pm