Just $x ne "" or testing the length alone doesn't work since I'd like to avoid the Use of uninitialized value ... warning in the case that $x is undef.use warnings; ... if (defined($x) && length($x)) { ... }
Thanks!
In reply to testing defined($x) && length($x) by perl5ever
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |