in reply to Re: How to map a directory tree to a perl hash tree
in thread How to map a directory tree to a perl hash tree

Is this what you want or am I missing something?
Yes, it does exactly what I want.

Now we have 3 solutions to compare:

Yours is perhaps the most natural - a recursive solution for a recursive problem.
japhy's solution neatly replaces recursion by iteration and enables the use of File::Find::find.
Mine , deprecated because based on string eval, uses the information extracted with File::Find::find directly.

All have similar complexity. Performance will probably be dominated by the disk access operations, not by the algorithm used.

Rudif
  • Comment on Re: Re: How to map a directory tree to a perl hash tree