- or download this
use strict; use warnings;
my %h=(a=>1,b=>2,c=>3);
...
my $gr = \%g;
print $gr->{a} # prints "1"
print $gr->{b} # prints "Use of uninitialized value in print"
- or download this
my %h=(a=>1,b=>2,c=>3);
my @x=('a','c');
my $hr = \%h;
my $gr = $hr->{@x};
print $gr->{a}
- or download this
my $gr = $hr{@x};
my $gr = $$hr->{@x};
my $gr = \%{$hr}{@x}