On Tue, 24 Apr 2001 18:39:09 -0700 (PDT), Larry Wall wrote:

>Edward Peschko writes:
>: I guess my question is what would be the syntax to access hashes? Would
>: 
>: $hashref.{ }
>: 
>: be that desirable? I really like ->{  } in that case..
>
>It won't be either of those.  It'll simply be $hashref{ }.

Er... hip hip hurray?!?!

This is precisely the reason why I came up with the raw idea of
highlander variables in the first place: because it's annoying not being
able to access a hash passed to a sub through a hash reference, in the
normal way. Not unless you do aliasing through typeglobs. A highlander
variable would get you that: that if a hash %foo exists, the scalar $foo
would automatically be a reference to that hash.

But, if there won't be full blown highlander variables, how does Perl
know if by $foo{THERE} you mean an item of the hash %foo, or a item in a
hash referenced by the hashref $foo?

-- 
        Bart.

Reply via email to