Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: matching a variable containing metacharacter treated as character

by choroba (Chancellor)
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.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: matching a variable containing metacharacter treated as character
by docdurdee (Scribe) 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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2016-12-06 07:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (101 votes). Check out past polls.