in reply to Recursing a hash

In your recursion, you're not doing anything with the return value from the embedded _get_top. Either you need to do a return _get_top(...) or save the return value and check if that was the right one if you have the possibility of needing to descend multiple times from a node.