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

AVOID STRING EVAL

I will.
I did have an inkling that a solution involving multiple references to the same data item (a nascent hash entry), perhaps combined with recursion, should be possible, but I could not see how it would fit together. But then as I wrote some test cases, initializing multilevel hashes, it dawned on me that I could construct similar Perl code on the fly and eval it - my first ever creative use for string eval. I must admit, I took the easy way out .-(
I probably cost me a --, but I'm wiling to pay my way.

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