Similarly to the Array references one can create references to Hashes as well.
my $phones_ref = \%phones;
Hash | Hash Reference |
%phones | %{ $phones_ref } |
$phones{Foo} | ${ $phones_ref }{Foo} |
$phones_ref->{Foo} | |
keys %phones | keys %{ $phones_ref } |
Similarly to the Array references one can create references to Hashes as well.
my $phones_ref = \%phones;
Hash | Hash Reference |
%phones | %{ $phones_ref } |
$phones{Foo} | ${ $phones_ref }{Foo} |
$phones_ref->{Foo} | |
keys %phones | keys %{ $phones_ref } |