in reply to Re^2: Read in a regex without having to use string eval?
in thread Read in a regex without having to use string eval?
I was actually referring to the qr{} part, but yeah, it's basically the same for \Q.
The deal with the quotemeta escape and such as well as interpolation is that they are meaningful in literals (such as qq"" and qr//), but they are not perceived as such by the regex engine should they be provided to it.
You can print out the result of qr to see the pattern that got compiled.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Read in a regex without having to use string eval?
by Argel (Prior) on Nov 23, 2011 at 02:17 UTC |