Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Unrecognized escape \Q passed through in regex

by Anonymous Monk
on Oct 14, 2012 at 05:23 UTC ( [id://998919]=note: print w/replies, xml ) Need Help??


in reply to Re: Unrecognized escape \Q passed through in regex
in thread Unrecognized escape \Q passed through in regex

No, eval is dangerous (even qr{} can be dangerous), use String::Interpolate or use
$str =~ s{\\Q(.*?)\\E){quotemeta $1}ge;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://998919]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-25 14:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found