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

But it works.

Indeed, it works, it is free of evil string eval, and you explained it in English.
And I still have 0.5 * $weekend ahead of me, to let it sink in. Thanks!

Rudif

PS. Your OGRE is awesome. But it adds an extra  (?-imsx:) around the regex that I type in, e.g. I ask  ([\.\d]+) and it returns and explains  (?-imsx:([\.\d]+)) - why?

Update You qr // the submitted regex, right? Just guessing, I did not look into the source code.

Replies are listed 'Best First'.
Re: Re: Re: How to map a directory tree to a perl hash tree
by japhy (Canon) on Mar 11, 2001 at 09:56 UTC
    I don't think so -- that would stop me from being able to point out the errors in a regex my own way.

    I add the (?:...) around it for several reasons. First, to honor any of the /imsx switches you have on. Second, so that the regex has ONE root node (easier to parse). Third, so the regex is "its own regex". (That third reason is probably lame.)

    japhy -- Perl and Regex Hacker