in reply to Re: Substitution Trickery
in thread Substitution Trickery

The test turns '/foo/' into '/foo', but avoids turning '/' into ''.


We're not surrounded, we're in a target-rich environment!

Replies are listed 'Best First'.
Re: Re: Re: Substitution Trickery
by jmcnamara (Monsignor) on Mar 21, 2003 at 16:21 UTC

    True but that isn't in the psuedo-code that lacertus presents.

    His test would also leave a trailing slash on 'foo/bar/'. Is that what is required? Perhaps lacertus will tell us.

    If it is required then the following would suffice:

    $served =~ s[/$][] if $served =~ m[^/.];

    --
    John.