in reply to Re: accessing a hash via reference
in thread accessing a hash via reference
Is the difference between
my %hash = %{$token->[2]}; and
my %hash = $token->[2];
The former trys to assign a string to a hash. Saying something like %hash = HASH(0x86b258)
The latter assigns a hash to a hash by telling perl that whatever is inside %{} is definately a hash.Perl then gos and gets whatever $token->[2] points to and dereferences it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: accessing a hash via reference
by Fletch (Bishop) on Sep 03, 2006 at 13:56 UTC | |
by richill (Monk) on Sep 03, 2006 at 14:09 UTC |