in reply to testing defined($x) && length($x)
if ($x and length($x)) {} # Do something
This should take care of your $x not being defined.
Update: Too early did not think clearly see below. Removed the offending/incorrect text.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: testing defined($x) && length($x)
by kennethk (Abbot) on Mar 25, 2009 at 16:34 UTC | |
|
Re^2: testing defined($x) && length($x)
by Bloodnok (Vicar) on Mar 25, 2009 at 16:41 UTC |