# Using "tie". use Tie::Hash::Inheriting (); { tie(my %data, 'Tie::Hash::Inheriting'); %data = ( Colour => 'blue', Entries => { Flowers => { Dahlia => { Smell => 'nice' }, Rose => { Colour => 'red' }, }, }, ); print $data{'Entries'}{'Flowers'}{'Rose' }{'Colour'}, $/, # red $data{'Entries'}{'Flowers'}{'Dahlia'}{'Colour'}, $/; # blue untie(%data); # Free mem. %data going out of scope is not enough. }