in reply to Undefined vs empty string
undef and "" are indeed different in Perl, but both are boolean false, so the test can be simplified to:
if (!$string) { }
See perlsyn#Truth-and-Falsehood.
Update: Except that "0" is also false, so if that’s a possibility, prefer BrowserUk’s solution, below.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|