I currently use the following Perl to check if a variable is defined and contains text. I have to check defined first to avoid an \'uninitialized value\' warnin
defined
You could say
$name ne ""
instead of
length $name > 0