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.
In reply to Re^2: accessing a hash via reference
by richill
in thread accessing a hash via reference
by richill
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |