Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 meditating upon the Monastery: (14)
As of 2014-07-22 22:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (129 votes), past polls