On Wed, Jun 27, 2001 at 11:51:01AM -0400, Chas Owens ([EMAIL PROTECTED]) spew-ed 
forth:
> On 27 Jun 2001 17:45:18 +0200, Jos Boumans wrote:
> > > How do you mean?
> > 
> > concider:
> > if ('a' == 'b') { print "foo" } # this will print 'foo', seeing 'a' and 'b' both 
>yield '1' in numeric
> > context here.
> 
> You mean 0 not 1 don't you?

# perl -wle 'print "a" ? "Yes" : "no";'

They are true values, 0 is false.

It would also print 'foo' if it were 'a' == 'bb' (althoug warnings
should yell at you for doing this :) If they yielded 0, it wouldn't
print 'foo'.

Cheers,
Kevin

-- 
[Writing CGI Applications with Perl - http://perlcgi-book.com]
"This Too Shall Pass"
    -- inscription on the inside of King Solomon's Ring.

Reply via email to