in reply to !0 is not necessarily 1 (was Re: Secret Perl Operators: the boolean list squash operator, x!!)
in thread Secret Perl Operators: the boolean list squash operator, x!!
Quoting elsewhere in this very thread:
it's mentioned in the Camel, in the "Ideographic Unary Operators" section, page 92:Unary ! performs logical negation, that is, "not". See not for a lower precedence version of logical negation. The value of a negated operand is true (1) if the operand is false (numeric 0, string "0", the null string, or undefined) and false ("") if the operand is true.
So I guess that boat has sailed not just practically (which it did a long, long time ago) but also as far as being officially documented. Larry did have some editorial control over "the Camel", no?
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: !0 is not necessarily 1 (was Re: Secret Perl Operators: the boolean list squash operator, x!!) (Larry)
by merlyn (Sage) on Aug 01, 2006 at 14:58 UTC | |
|