While this code example does still work, it represents, to a certain extent, a failure in development logic.

The case scenario given is that two conditions must be true for a true result to the expression - The order of developer logic should follow testing each condition individually and then applying the AND logic to the condition results. The application of conditions within parentheses as given by BeernuT follows this order.

With the code given, this only works because of the precedence of operands as described in perlop.

 

Update

By failure of development logic, I refer not to the deparsing of code, because as highlighted by blakem below (++blakem), the result is identical, but rather the logic driving the writing of the code. In this instance, Anonymous Monk voiced confusion in order and syntax, presumably the result of trying to merge everything together without respect to the individual order of elements within the logic process.

This node was intended to direct discussion towards cause moreso than effect.

 

perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'


In reply to Re: Re: if and by rob_au
in thread if and by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.