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

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?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2015-11-26 14:22 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (701 votes), past polls