in reply to Re: why can't compare a variable with undef directly?
in thread why can't compare a variable with undef directly?
Extending what Eily said, eq and the other string comparison operators, impose string context to their operands. This also will not work.
defined is the only operator that reliably tests for undef.
|
|---|