Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://94342]
help
Chatterbox?
[shmem]: but I'm crumbling smaller stones. remember...
[stevieb]: I'm working on it to fatten it up and make it more reliant so I can finalize my Raspberry Pi automated build system for that software :) It's all well and fun, until I try to make it work with Windows lol
[shmem]: "debugging a program is more difficult than to write it in the first place. If you code your program as smart as you are, you are, by definition, too dumb to debug it."
[stevieb]: I literally laughed. That's good :) Perhaps I just need to go climb another mountain and forget about it
shmem seeks a tate and smikes a pope

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2017-03-28 22:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (342 votes). Check out past polls.