Thread (39 messages) flat view 39 messages, 6 authors, 2016-06-15

Re: [PATCH RFC3.5 05/12] send-email: Improve redability and error-handling in send_message's sendmail code

From: Michael Witten <hidden>
Date: 2016-06-15 22:46:37

On Sat, Apr 18, 2009 at 20:51, Jay Soffian [off-list ref] wrote:
What is '//' about?
It's called the Logical Defined-OR:

    http://perldoc.perl.org/perlop.html#C-style-Logical-Defined-Or
Although it has no direct equivalent in C, Perl's // operator is related to its C-style or. In fact, it's exactly the same as ||, except that it tests the left hand side's definedness instead of its truth. Thus, $a // $b is similar to defined($a) || $b  (except that it returns the value of $a rather than the value of defined($a)) and is exactly equivalent to defined($a) ? $a : $b . This is very useful for providing default values for variables. If you actually want to test if at least one of $a  and $b  is defined, use defined($a // $b) ...
However, I wonder if your comment is a veiled quip at my "Improve
redability" claim (which is also ironically unreadable). :-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help