Re: TRUE

Michael G Schwern <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Message-ID <[email protected]>
On Fri, Feb 06, 2004 at 08:24:21PM +0100, Abigail wrote:
> > Would you do "if (returns_a_true_value() eq TRUE)"? "== TRUE"?
> > Neither would work, and you can just do "if (returns_a_true_value())"
> > directly anyway.
> 
> 
> Not a problem for the Fun With Perl mailinglist, is it?
> 
>     if (returns_a_true_value () xor FALSE) {
>         print "It returned true.\n";
>     }

I myself prefer:

	print "It returned true\n" if !!returns_a_true_value() == TRUE

!! is the "convert to boolean" operator. :)


-- 
Michael G Schwern        [email protected]  http://www.pobox.com/~schwern/
Monkey tennis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.