Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: regex search fails

by friedo (Prior)
on Mar 12, 2009 at 14:41 UTC ( #750174=note: print w/ replies, xml ) Need Help??


in reply to regex search fails

Try print if /\Q$pattern/. Since your pattern contains the literal string '$testVar', using the \Q escape will prevent it from being interpolated in the match.


Comment on Re: regex search fails
Select or Download Code
Re^2: regex search fails
by stephanm (Sexton) on Mar 12, 2009 at 23:03 UTC
    Thanks everyone. The \Q did the trick.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2015-07-04 02:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls