http://qs321.pair.com?node_id=1215558


in reply to Re^3: A more elegant way to filter a nested hash?
in thread A more elegant way to filter a nested hash?

I agree with most of what you said.

IMHO recursive solutions are easier to write and maintain, I'd only translate them to iterative if performance mattered.

Point is you still need some kind of call stack* which needs to be simulated then.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

*) in this case the last positions in the tree and remaining keys for each sub hash.

  • Comment on Re^4: A more elegant way to filter a nested hash?