It should work reliably (but I couldn't find any links about it, besides Truth and Falsehood, Scalar values). You can force any true value to be 1 by adding !! before it. You can also use $r += $temp > 100 ? 250 : 0; if you are still in doubt.
Update: as pointed out above, it usually works and should work further, but the ternary operator is safer.
In reply to Re: Is this reliable?
by aitap
in thread Is this reliable?
by misterperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |