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.
- Re: Strings vs Numbers (Re: Tying & Overloadin... Edward Peschko
- Re: Strings vs Numbers (Re: Tying & Overloading) Michael G Schwern
- Re: Strings vs Numbers (Re: Tying & Overloadin... Nathan Wiger
- Re: Strings vs Numbers (Re: Tying & Overloading) John L. Allen
- Re: Strings vs Numbers (Re: Tying & Overloading) Edward Peschko
- Re: Strings vs Numbers (Re: Tying & Overloading) Larry Wall
- Re: Strings vs Numbers (Re: Tying & Overloading) Edward Peschko
- Re: Strings vs Numbers (Re: Tying & Overloading) Larry Wall
- Re: Strings vs Numbers (Re: Tying & Overloading) Peter Scott
- Re: Strings vs Numbers (Re: Tying & Overloadin... Randal L. Schwartz
- Re: Strings vs Numbers (Re: Tying & Overloading) Bart Lateur
- Re: Strings vs Numbers (Re: Tying & Overloading) Bart Lateur
- Re: Strings vs Numbers (Re: Tying & Overloading) Larry Wall
- Re: Strings vs Numbers (Re: Tying & Overloading) Eric Roode
- Re: Strings vs Numbers (Re: Tying & Overloading) Simon Cozens
- Re: Strings vs Numbers (Re: Tying & Overloading) Bart Lateur
- Re: Strings vs Numbers (Re: Tying & Overloadin... Larry Wall
- Re: Strings vs Numbers (Re: Tying & Overloadin... David L. Nicol
