http://www.perlmonks.org?node_id=1016140


in reply to How come undef eq '' ??

That's also why Perl calls itself a pragmatic language. Its purpose is to get stuff done, not to be an NP-complete problem or the expression of what some academic's notion of a perfect language ought to be. You're doing a string comparison. One value happens to be undefined. Do you blow up the program? No. You keep going, especially if you've not been told to be strict or to use warnings. An empty-string is the most plausible string representation of an undefined-value. Or at least it was at some time to someone. So that's what it does.