Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I won't get into the train of thought that led to the following thought experiment:
The print ref() obviously prints nothing but a newline. However, I was quite surprised when the two trinary statements both printed "Y". I went back to the documentation and looked up both defined() and undef(). Defined "Returns a boolean value telling whether EXPR has a value other than the undefined value 'undef'...". Looking over at the undef docs, it "always returns the undefined value". How is it possible for ref($foo) to be both defined and == undef? ~Cybercosis nemo accipere quod non merere In reply to Undefined undef oddness by Cybercosis
|
|