in reply to Re: Re: Package variables and Parse::RecDescent
in thread Package variables and Parse::RecDescent
My point was mostly about escaping back slahes or a potential § somewhere in your code. For instance
So the regex that starts off being "match a backslash followed by a period" becomes "match a backslash followed by any non newline character". Not exactly the same thing. WhereasE:\blead> perl -e "print q§/\\\./§" /\\./
Outputs the expected /\\\./#!perl print <<'ENDOFHERE'; /\\\./ ENDOFHERE
For this reason, I tend to do my best to avoid using the q// operator when Im trying to quote code. After all you never know when you'll stick a double backslash into the code, and it might save you hours of debugging trying to figure what the problem was, wheras the HEREDOC notation is only slightly more characters to write, with virtually no chance of this happening.
--- demerphq
my friends call me, usually because I'm late....
|
|---|