You probably want something like this:
print $a == 6 ? 'yes' : 'no'; [download]
In reply to Re: if else in the other way by jwkrahn in thread if else in the other way by Anonymous Monk