On Sat, Feb 02, 2002 at 04:10:58AM -0800, John W. Krahn wrote:
> "Michael R. Wolf" wrote:
> > Any value that is not false is true.  What 3 values indicate
> > false?
> 
> 
> Are you sure there are only three?   :-)
> 
> $ perl -le'
> print qq(undef is FALSE) unless undef;
> print qq("" is FALSE)    unless "";
> print qq("0" is FALSE)   unless "0";
> print qq(0 is FALSE)     unless 0;
> print qq(0e0 is FALSE)   unless 0e0;
> '
> undef is FALSE
> "" is FALSE
> "0" is FALSE
> 0 is FALSE

Well, so is anything that evaluates to any of these, so the following
don't really count:

> 0e0 is FALSE

  0e42
  0.0000
  000
  0.
  .0
  1-1
  substr "qaz", 0, 0
  substr "q0z", 1, 1

and don't forget the empty list ()

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to