in reply to Data structure question: Directory-in-memory ?
I like the idea of using '/' as the key for the data associated with the directory. You could also use the empty string as that key.
Are you using File::Find to recurse the directory tree? If so, my first instinct is "stop". Getting File::Find to play nice with this kind of thing is a pain but rewriting File::Find's functionality such that you can pass along the proper hash-to-be-filled in the recursive step is pretty trivial.
Or, if you want to impress your friends, read Re: How to map a directory tree to a perl hash tree and use its technique. (:
- tye (but my friends call me "Tye")
|
|---|