develooper Front page | perl.fwp | Postings from December 2001

Re: tri-state flags

Thread Previous | Thread Next
From:
Bart Lateur
Date:
December 5, 2001 06:12
Subject:
Re: tri-state flags
Message ID:
67as0u839uombgk2046ngoigfcq5ikgpcd@4ax.com
On Wed, 5 Dec 2001 07:44:00 -0400, Bernie Cosell wrote:

>but from what he said, I'd think that bumming off of concluding "It is not 
>undef and not true" implies "it must have been zero" is legit within the 
>parameters of the challenge, no??

Yes. The values to test for are true, false (but not undef), and undef. 

In practice, such a flag can get set through a perl boolean, so "0" is
not the only possible false-but-defined value. I'd hate to have to do

	$matched = /PATTERN/ || 0;

just to get around that.

The meaning of the test is "did I set this to false?", so it must be set
(= defined), and false.

-- 
	Bart.

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