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

Re: safe regex variables

by srawls (Friar)
on Jul 06, 2001 at 03:34 UTC ( #94342=note: print w/ replies, xml ) Need Help??


in reply to safe regex variables

Japhy already answered your question, but I thought I'd add that when you write this:

if (/^-+\$boundary/){
It means to match a literal $ sign, then the string 'boundary.' To do what you want, just do what japhy said and use:
if (/^-+\Q$boundary\E/){
(or you can use quotemeta on $boundary)

The 15 year old, freshman programmer,
Stephen Rawls


Comment on Re: safe regex variables
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2015-07-04 03:44 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