NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
And is not really the negation of or (Score:1)
$value = defined($value) ? $other_value : undef;
but I'm not sure what it would be good for.
Re: (Score:2)
It's useful if you want to munge a value if it's defined. I've found it useful when doing something like this:
In other words, if there is no message, don't stick in extraneous paragraph tags in the HTML. I'm sure there are plenty of other cases where you might want to take an extra action if a value is defined.
Re:And is not really the negation of or (Score:1)
Reply to This
Parent
Re: (Score:2)
Heh. Something like that :) Now where are my Unicode cheat sheets ...