in reply to Checking Variable for Not Null
You haven't said what you understand by "null" in this context. "null" is not a concept in Perl. We have defined and we have true. eg:
| Value | True? | Defined? |
|---|---|---|
| undef | No | No |
| 0 | No | Yes |
| '' | No | Yes |
| 1 | Yes | Yes |
| 'TIMTOWTDI' | Yes | Yes |
BTW, do you really find unless ! to be clearer than if?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Checking Variable for Not Null
by dirtdog (Monk) on May 27, 2015 at 15:16 UTC |