Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Ah, can't believe I missed the keys were only being deleted once! hash_filter_delete is indeed the only function which modifies the source hash instead of constructing a new one. See this node for the inspiration. As for the tiny payload, the data I am actually using this hash_filter function on is of similar size and depth. I could try out some larger payloads with more levels of hash nesting to see if the iterative version does any better. Thanks, Jim πάντων χρημάτων μέτρον έστιν άνθρωπος. In reply to Re^3: A more elegant way to filter a nested hash? Benchmarks!
by jimpudar
|
|