in reply to Re^4: Is // a "Null coalescing operator" ?
in thread Is // a "Null coalescing operator" ?
A (relational) database NULL is certainly not equivalent to a Perl undef. Ignoring lots of details, the basic difference is:
In other words, once you have a NULL, if you apply operations to it (except a few special ones), you remain having a NULL. undef is quite different - it happily behaves like a defined value (0, or the empty string), and once you start applying (most) operations on it, it becomes defined.undef binary-OP defined-value -> defined-value NULL binary-OP not-NULL -> NULL
NULL + 1 == NULL undef + 1 == 1
|
|---|