in reply to Re: creating the hierarchy pattern from the input file
in thread creating the hierarchy pattern from the input file

> built a tree of nested hashes with arrays as leaves

That's not possible, because the input has varying depth causing conflicts.

One parent level can't be hash and array at the same time.

And hashes can't have duplicate keys. So maybe he rather wants nested arrays?

If the OP didn't show code, then he should at least have shown valid target data.

Update

Or maybe the OP doesn't want data but just text displaying a tree?

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

  • Comment on Re^2: creating the hierarchy pattern from the input file