Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by Anonymous Monk
on Oct 14, 2012 at 05:23 UTC ( #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? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2022-01-25 06:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (65 votes). Check out past polls.

    Notices?