Re: suppress regex parsing in interpolated string




stevenkobes@xxxxxxxxxxx wrote:
I have
s/$foo/$bar/;

But $foo and $bar might have funny characters [ ] { } etc., and I want
them taken literally rather than parsed as regular expressions.

How can I do this substitution? Thanks.

perldoc -f quotemeta

-jp

.



Relevant Pages