good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^3: Unrecognized escape \Q passed through in regex ('interpolations")by tye (Sage) |
on Jan 27, 2006 at 04:00 UTC ( [id://525895]=note: print w/replies, xml ) | Need Help?? |
\Q and \E don't work inside interpolations. They only work in regexp literalsFascinating theory, but easily proven wrong: Your example shows a \Q being used inside of a quoted string, not inside of a string value being interpolated (into a string or regex). You've misunderstood how "interpolation" was originally used. I'll agree that the original use of "interpolation" wasn't clear enough. Though, double-quoted strings allow interpolation but I wouldn't call a quoted string that didn't contain any variables "an intepolation". - tye
In Section
Seekers of Perl Wisdom
|
|