[thelist] Redirection

David Ulevitch davidu at everydns.net
Fri Jul 26 19:38:01 CDT 2002

<quote who="David Bindel">
>> I haven't used any programming languages before where you could
>> write
>>         if ($x == 'this' || 'that')
>> and have it interpreted as
>>         if ($x == 'this' || $x == 'that')
>> but I would be very interested someone else has.
> I think it would seem logical to write
>             if ($x == ('this' || 'that')
> but unfortunately, C-based languages don't agree :-(

*I* don't think that's logical to accomplish the original goal...Using
parenthesis just clarifies what it _should_ and _does_ do.  It is logical
to do what it intends, compare 'this' to 'that' and then the resulting
boolean to $x. :-)


"Never doubt that a small group of thoughtful citizens can change the
world. Indeed, it is the only thing that ever has." --Margaret Mead

More information about the thelist mailing list