in reply to Re: Unexpected effect of -w with undef
in thread Unexpected effect of -w with undef

Aw.... Dang!

/me smacks forehead.

--DrWhy

"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."

  • Comment on Re^2: Unexpected effect of -w with undef

Replies are listed 'Best First'.
Re^3: Unexpected effect of -w with undef
by Aristotle (Chancellor) on Dec 22, 2004 at 16:41 UTC

    Hehehehe. I looked at it in befuddlement for a moment as well after I pasted the code in a terminal and it didn't print a thing. Then I went “Oh! Heh, he'll be really embarrassed when he reads the answer.” Don't sweat it though, we all have our moments. :-)

    Makeshifts last the longest.

      What confused me is that undef eq undef is true, I guess indoctrinated by SQL hanDling of NULL I expect it to be undefined or false ... I guess this is not something that will get changed however.

      /J\

        That is perfectly logical. eq compares strings. undef stringifies to a an empty string. Two empty strings are equal.

        Makeshifts last the longest.