Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: matching a variable containing metacharacter treated as character

by choroba (Abbot)
on Feb 21, 2013 at 16:20 UTC ( #1019975=note: print w/ replies, xml ) Need Help??


in reply to matching a variable containing metacharacter treated as character

Use \Q:

grep /\Q$var/, @foos;
See Escape sequences for details.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: matching a variable containing metacharacter treated as character
Select or Download Code
Re^2: matching a variable containing metacharacter treated as character
by docdurdee (Beadle) on Feb 21, 2013 at 16:47 UTC
    Thank you!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2014-07-14 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (252 votes), past polls