in reply to Re^5: Do I need to use defined?
in thread Do I need to use defined?
...
Read my posting again. I'm using list context in both cases.
Or just read "Truth and Falsehood" in perlsyn:
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 not returns a special false value. When evaluated as a string it is treated as "" , but as a number, it is treated as 0. Most Perl operators that return true or false behave this way.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Do I need to use defined?
by Anonymous Monk on Sep 07, 2017 at 07:22 UTC | |
|
Re^7: Do I need to use defined?
by Anonymous Monk on Sep 07, 2017 at 07:33 UTC |