my $words = { 'foo' => { named_property_x => 'nn', named_property_y => 'nns', }, 'bar' => { named_property_x => 'nvbg', named_property_y => 'np', }, }; my $lookup = 'foo'; print $words->{$lookup}->{'named_property_x'}; # Would print 'nn' foreach my $named_property (%{$words->{$lookup}}) { # This would print all the named properties for a specific word, in no particular order print $named_property . ':' . $words->{$lookup}->{$named_property} . "\n"; } # To add a new word and/or tag: $words->{'baz'}->{'named_property_z'} = 'nps'; # Do delete a tag delete $words->{'baz'}->{'named_property_z'}; # To check for a specific tag: if ( $words->{'baz'}->{'named_property_z'} eq 'nps' ) { ... }