develooper Front page | perl.perl5.porters | Postings from June 2003

Re: perlbool.pod rev.1

Thread Previous | Thread Next
From:
Autrijus Tang
Date:
June 30, 2003 03:06
Subject:
Re: perlbool.pod rev.1
Message ID:
20030630100821.GB1346@not.autrijus.org
On Mon, Jun 30, 2003 at 05:42:44PM +0900, Dan Kogai wrote:
> Like references already knows C<undef()> is always false so no

This should read:

    Like references, perl already knows...

> When you need a function that needs to return 0 in numerical value but
> evaluates to true, use "0 but true" as the return value.

Oh my god.  Didn't realize there is a special-case right there 
in numeric.c.

Another way to do it is "0E0", and you may wish to add it as an
alternative for mathematically-minded people.

Thanks,
/Autrijus/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About