in reply to When testing for certain hash positions as non-zero, why werent the test positions set to empty string?

You seem to be saying that at some point in history, perl autovivified uninitialised hash elements to the null string. To my knowledge, that has never been the case. They have always been set to undef.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy
  • Comment on Re: When testing for certain hash positions as non-zero, why werent the test positions set to empty string?

Replies are listed 'Best First'.
Re^2: When testing for certain hash positions as non-zero, why werent the test positions set to empty string?
by JavaFan (Canon) on Aug 23, 2010 at 15:01 UTC
    Yes. And using an undefined value as if it were a string makes it act like an empty string. Perhaps the OP hadn't enabled warnings, and saw this behaviour, leading to the confusion.

    But that's a lot of speculation.