tie %trie, 'Tie::Trie'; $trie{ fred } = 10; $trie{ bill } = 20; $trie{ total } = sum values %trie;