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

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 making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2015-10-07 21:10 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (200 votes), past polls