A code recipe for traversing Perl hashes of any depth