-----Original Message-----
From: david [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 3:55 PM
To: [EMAIL PROTECTED]
Subject: Re: New to Perl


Wc -Sx- Jones wrote:

you said:

> UNDEF will be 'treated' as FALSE; Larry had to have some sanity
> somewhere...

clearly stating that undef is false but later you said:

> 
> ( But, UNDEF is not TRUE OR FALSE - it is undefined. )
> 

clearly stating that undef is neither true nor false. which way is it?

i got some off line messages telling me to just ignore this thread so this 
will be my last post to this thread and i want to make it clear:

* undef in Perl is false:

[panda]# perl -le 'print +(undef) ? "true" : "false"'
false
[panda]#

* any valid Perl expression can only be evaluated to 2 possible values when 
used as a boolean expression: true or false.

david
-- 
s$s*$+/<tgmecJ"ntgR"tgjvqpC"vuwL$;$;=qq$
\x24\x5f\x3d\x72\x65\x76\x65\x72\x73\x65
\x24\x5f\x3b\x73\x2f\x2e\x2f\x63\x68\x72
\x28\x6f\x72\x64\x28\x24\x26\x29\x2d\x32
\x29\x2f\x67\x65\x3b\x70\x72\x69\x6e\x74
\x22\x24\x5f\x5c\x6e\x22\x3b\x3b$;eval$;

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>

David,
           undef is false in perl. Jones did not mean what you pressumed. 
           but not all false are undefs. So undef is sub set of false, that can be 
tested using defined( ) etc.
             Jones meant that, an undef would return false in a logical context.
           For example :  23 - 23 is not false. It evaluates to false in a logical 
context.
Anyway, my humble opinion is , this thread is too much on too small problem.
thanks,
Jay

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to