my $trie = Trie->new(); $trie->add( 'fred', 10 ); $trie->add( 'bill', 20 ); my $temp = sum map{ $trie->lookup( $_ ) } 'fred', 'bill'; $trie->add( 'total', $temp );