in reply to Re^3: What could make "()" a good value for boolean false?
in thread What could make "()" a good value for boolean false?

The concept of truth of something in list context makes no sense.
As fas as I understand it truth - as fas as perl is concerned - is the result of evaluating something in boolean context.

In boolean context an array evaluates just like in scalar context to it's length.

Therefore I would claim that the statement above ("A list with one element is true") is actually correct.

  • Comment on Re^4: What could make "()" a good value for boolean false?

Replies are listed 'Best First'.
Re^5: What could make "()" a good value for boolean false?
by ikegami (Patriarch) on Apr 01, 2016 at 16:04 UTC
    I agree that an array with one element is true, but arrays and lists are different things.