http://www.perlmonks.org?node_id=1019373


in reply to Is this reliable?

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

I find it very readable.