note
repellent
Apparently, in Lisp, this is referred to as a <i>semi-predicate</i> problem.<br/>
<br/>
The very fact that you are using<br/>
<c>
if ($2)
</c>
followed by
<c>
$price = $1 . "." . $2
</c>
shows that you are using <c>$2</c> as a semi-predicate, i.e. to show validity and to hold value.<br/>
<br/>
Next time, whenever you use <c>if ($var)</c>, you should consider if <c>$var</c> needs to be a full-predicate, i.e. strictly a boolean to only show true-or-false.
680590
680611