From: Michael Witten Date: Sun, 19 Apr 2009 02:13:20 GMT Subject: Re: [PATCH RFC3.5 05/12] send-email: Improve redability and error-handling in send_message's sendmail code Message-ID: In-Reply-To: <76718490904181851g2701ce59x614ea60452b914ce@mail.gmail.com> On Sat, Apr 18, 2009 at 20:51, Jay Soffian 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). :-)