in reply to defined vs null string

In the case of memory variables, a variable either “has a value” or “it has no value at all.”   This is the meaning of undef.   In fact, it is useful to think that “a variable which has no value ... has a value, and that value is:   undef.”

SQL databases define a similar concept, NULL, for the same reason.   Database interface layers like DBI ordinarily recognize undef as an indicator that a column should be set to (or that it presently is...) NULL, but in other language implementations this might not strictly be the case.   Microsoft’s Variant data-type system, for example, defines VarEmpty and VarNull as two separate possibilities in the underlying storage-record which defines a Variant value.

In both cases, “the absence of any value at all” is purposely distinct from both “zero” and “empty string.”   Both of these are values.