in reply to Re^2: Checking Variable for Not Null
in thread Checking Variable for Not Null
In that case, your “null” corresponds to the empty string, so you can test for true or false (because the empty string is “false” in Perl):
next if !$ex_date;
But it’s better (because clearer) to make the test explicit:
next if length $ex_date == 0; # or next if $ex_date eq "";
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Checking Variable for Not Null
by dirtdog (Monk) on May 27, 2015 at 15:22 UTC |