On Tue, Feb 01, 2005 at 05:34:18PM -0000, Steve Peters via RT wrote:

> While I agree that an explanation of why "print !!0" doesn't work isn't
> needed (take a look at Devel::Peek.  It's your friend!), I was unable to
> find actual documentation as to what values actually evaluate to TRUE or
> FALSE in Perl.  There is some pasing references to "", 0 and 1 in
> perlop.pod.  perlfaq4 deals with hashes.  The rest, as I've painfully
> learned in the past, are undocumented and a common source of bugs for
> beginners.

perldoc perlsyn:

  Truth and Falsehood

  The number 0, the strings '0' and '', the empty list "()", and "undef"
  are all false in a boolean context. All other values are true.

Is that sufficient?  I'm not sure what you mean by "the rest".

Ronald

Reply via email to