in reply to Dereferencing hashrefs
my $val = $hr->{val}; foreach my $key (keys %$hr) { # etc } [download]
gav^