In what way does it not convey intent?

or is a boolean operator and implies an expression. Using if as a statement modifier is altogether different than forcing the role of implied if on the or operator.

What? I don't understand what you're saying. The page you linked says

Binary "or" returns the logical disjunction of the two surrounding exp +ressions. It's equivalent to || except for the very low precedence. T +his makes it useful for control flow: print FH $data or die "Can't write to FH: $!";

So I don't see how intent isn't conveyed,  ... or ... is very common pattern, very familiar, seems like intent

Completely replacing a chunk of code in order to make a small change to it means that the replaced code didn't scale at all! The "It" in "It also scales better" was referencing if compared to unless. Using unless tends quickly to get into double negative land making it harder to think about complicated expressions and harder to maintain code using them.

Does it really matter what "It" you're refering? Ok, I'll give it a shot

die unless $live; ## the original line, which I expand a minute later die unless $live or $reanimated; ## first change, and first error; mo +ving on for now die unless $live or $reanimated or !$cooked; ## second change double n +egative, scary, still error, abandon unless, abandon unless, abandon +unless die if !$live or !$reanimated or $cooked; ## clarity, it works ... but + some people think differently, so choice, die if !($live or $reanimated) or $cooked; ## whooops, error again, lo +gic not practiced die if !($live and $reanimated) or $cooked; ## works again, choice is +choice

So yeah, I don't see any issue with how it "scale"

But I do see how having many things in unless gets confusing... if you cannot instantly write it correctly the first time

because I don't practice using unless this way, I don't think about it that way

but it didn't take a lot of practice to learn to use if, unless is the same way, just have to practice and learn

but yeah most people don't do that


In reply to Re^5: next unless condition (if unless) by Anonymous Monk
in thread next unless condition by hankcoder

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.