in reply to Re: Perlmonks Code Proxy
in thread Perlmonks Code Proxy

Sheesh. That's what I get for posting code too quickly. Fortunately, this hasn't caused a problem as I have used exclamation points as delimiters (and avoided the problem with the slashes) and the dot metacharacters match the actual dot characters. I got lucky! Thanks for pointing that out.

This has actually caused me a problem with the $match variable as this will often contain characters that will have special meaning in a regex, but I can't simply wrap them in \Q and \E because of the problems with $ and @, so I'm going to write a short snippet that will handle that substitution for me, but this is turning out to be just a more difficult problem than I imagined!

Cheers,
Ovid

Replies are listed 'Best First'.
RE: (Ovid) RE(2): Perlmonks Code Proxy
by jplindstrom (Monsignor) on Aug 19, 2000 at 18:52 UTC
    If you want to have the variable contents being interpreted as a string literal rather than regex chars, the perlfunc:quotemeta function is useful.