in reply to Re^2: /x modifier with \Q and \E
in thread /x modifier with \Q and \E

I suppose you are aware of quotemeta function, which you could use for the same effect of \Qpattern\E something like (one of many variations) ...

my @patterns = map { quotemeta $_ } @string

In any case, as the Gory details says, be aware of what happens with [$@] in \Q (or quotemeta) including other meta characters.

Replies are listed 'Best First'.
Re^4: /x modifier with \Q and \E
by wardy3 (Scribe) on Apr 01, 2008 at 08:32 UTC
    Brilliant. I was aware of quotemeta but I had totally forgotten. I was even considering writing my own version :-(

    Thanks for the help - that's what I'll use.