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

Re: tri-state flags

Thread Previous | Thread Next
Bart Lateur
December 5, 2001 06:12
Re: tri-state flags
Message ID:
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.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About