note
frozenwithjoy
My preference is to use the ternary operator (like others have shown) if you are setting <c>$r</c> once, but if I were updating <c>$r</c> in a loop, for example, based on the value of <c>$temp</c>, I'd probably just go with this:
<c>
$r += 250 if $temp > 100;
</c>
<p>I find it very readable.</p>
1019361
1019361