in reply to Re: Switch/Format to not interpret metacharacters in regex?
in thread Switch/Format to not interpret metacharacters in regex?

See also the built-in quotemeta function (which does something very similar to \Q ... \E).

Not only similar. quotemeta is the function implementing the \Q escape, according to quotemeta.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^3: Switch/Format to not interpret metacharacters in regex?
by Laurent_R (Canon) on Dec 06, 2019 at 09:10 UTC
    Yes, afoken++, you're right. I did not want to say that they are identical, because they have a different calling syntax, but, yes, they do the same thing.