--- Jeff Pinyan <[EMAIL PROTECTED]> wrote:
> On May 16, Paul said:
>
> >"or" also short circuits, and some consider it more readable, but it
> >(and the "and" operator) always return(s) a boolean value, while ||
> >(and &&) return the value of the first true expression.
> >
> > $a or $b # returns 1 if either has a non-false value, else ''
> > $a || $b # returns $a if nonfalse, else $b if nonfalse, else ''
>
> That is misinformation.
>
> #!/usr/bin/perl -l
>
> print (10 || 100);
> print (10 or 100);
> __END__
> 10
> 10
With profound apologies, I agree! I could swear I saw that in
documentation, and have been coding accordingly for quite a while.
Thanks, Jeff.
And *THAT*'s why I like posting to this list! =o)
Paul
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/