but it's also not equivalent to the first: Quite correct...I forgot to change the unless() to a just if(). Updated my post.

Don't do X if A,B,C are all false <- this is the original unless statement
this the same: Do X if any of A,B,C are true (X doesn't happen if A,B,C are all false).

I don't think there is anything truly controversial here. I would also agree if the code has been working and this is a modification, I'd leave it alone (as we see its easy to make a mistake with all these Not's!). If the code is still in initial development, then simplifying this convoluted loop condition is something I'd seriously consider.


In reply to Re^9: regex return true instead of false (precedence) by Marshall
in thread regex return true instead of false by ovedpo15

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.