Dan Anderson wrote: > However a hash is just an even valued list, so %hash1 is the same as > %hash2: > So that instead of accessing elements by $hash1{foo} you'd access them > by $hash1->{foo}. > > I think I've successfully improved, right?
Yes. You're closer, but still a little off.: > However a hash is just an even valued list, so %hash1 is the same as > %hash2: A hash is a heckuva lot more than an even valued list. Hashes take lists with even number of values as static initializers. They also serialize themselves as similar lists for transfer through interfaces. When intact, though, they use storage and retrieval algorithms that have nothing to do with sinple array structures. It is the transfer process that squeezes the magic out of them. This is why we use references. By leaving the hash in place, and passing a variable by which the intact structure can be accessed, we harness its full power, which is truly immense. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>