in reply to late binding behavior in hash definition

princepawn, I think that's Perl trying to do the right thing. In your %x hash example, you are defining %x, As such, $x{1} is not defined until you finish defining %x. It's an atomic transaction. So trying to access it before it was defined gives you an undef. This seems like correct behavior.

In your later example, you are refering to an already existing $y{1}, so you can access it's contents.

=Blue
...you might be eaten by a grue...

  • Comment on Re: late binding behavior in hash definition