Come for the quick hacks, stay for the epiphanies. | |
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?? |
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
In Section
Seekers of Perl Wisdom
|
|