李斯特 发表于 2015-12-28 14:20:52

Perl Truth and Falsehood

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. Negation of a true value by !or notreturns a special false value. When evaluated as a string it is treated as '' , but as a number, it is treated as 0.
页: [1]
查看完整版本: Perl Truth and Falsehood