in reply to Re^2: complaint: always testing defined()
in thread complaint: always testing defined()
OP is checking for defined-ness solely to avoid generation of the warning (if the variable being checked against the empty string happens to be undefined). To me, that is whole reason for existence of this thread (from OP)...
I find myself doing:to avoid a runtime warning.if (defined($params->{root}) && $params->{root} eq '')
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: complaint: always testing defined()
by ysth (Canon) on Nov 04, 2007 at 03:29 UTC | |
by parv (Parson) on Nov 04, 2007 at 13:04 UTC | |
by ysth (Canon) on Nov 05, 2007 at 03:36 UTC | |
by parv (Parson) on Nov 05, 2007 at 09:03 UTC | |
|
Re^4: complaint: always testing defined()
by syphilis (Archbishop) on Nov 03, 2007 at 12:10 UTC |