in reply to Normalized directory paths

I think you can do without the defined. Also, the 'g' modifier seems to work for me...

Added later.. Well, you are right, the 'g' does not work. How about using
1 while (blah blah);
instead? I just hate seeing the contruct:
{;}

Replies are listed 'Best First'.
RE: Re: Normalized directory paths
by mikfire (Deacon) on May 16, 2000 at 21:53 UTC
    No. That was already tried and, as I mentioned, will not work. In order to avoid some very nasty deep recursion problems, the regex does double-quotish expansion only once, at the beginning of the match process.
    Your solution breaks on something ( admittedly idiotic, but for what I am doing I need to be absolutely certain I parse the path correctly ) like this:
    /foo/mik/../mik/./../mik
    The regex you provide translates that to /foo/mik/mik, when the correct answer is /foo/mik
    Mik