http://qs1969.pair.com?node_id=503777


in reply to Using multi-level hashes

$project{$activeProject}{components}{"Software"}{subComponents}{"Database"}{label} is syntactically equivalent to $project{$activeProject}->{components}->{"Software"}->{subComponents}->{"Database"}->{label}.

The $project hash's values are hashrefs. You can modify the values of those hashrefs within a subroutine.

my %h; $h{a}{b}{c} = 'd'; print "$h{a}{b}{c}\n"; f($h{a}{b}); print "$h{a}{b}{c}\n"; sub f { my $x = shift; $x->{c} = 'e'; }

produces

d e