... isn't $hash-{$key} pointing to %hash? What am I missing?
You're missing the point that the expressions $hash{foo} and $hash->{foo} refer to different and quite separate hashes.
>perl -wMstrict -le "my %hash = ( foo => 'bar' ); my $hash = { foo => 'not_bar_at_all' }; ;; print qq{what is foo? $hash{foo}}; print qq{what is foo? $hash->{foo}}; " what is foo? bar what is foo? not_bar_at_all
In reply to Re^3: (another) HoH question
by AnomalousMonk
in thread (another) HoH question
by zuma53
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |