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.
In reply to Re: Re: Re: Substitution Trickery
by jmcnamara
in thread Substitution Trickery
by lacertus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |