Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Regex error when [] occurs in file..

by CountZero (Bishop)
on Mar 03, 2008 at 17:12 UTC ( [id://671677]=note: print w/replies, xml ) Need Help??


in reply to Re: Regex error when [] occurs in file..
in thread Regex error when [] occurs in file..

If you would happen to have the '#' character inside a (single or double) quoted string in your config file (I don't know if the specs for your config-file even allow this) then the s/#.*$// regex will cause you trouble as it will delete all of the string starting with the '#' character. That is probably not what you want.

It is not easy to take care of this: not even Regexp::Common gets it right.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 23:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found