|Do you know where your variables are?|
Re: Best practice or cargo cult?by Argel (Prior)
|on Jun 20, 2006 at 22:00 UTC||Need Help??|
Here's a rough summary of TheDamian's reasoning:
/x (PBP pgs 236-237)
RegEx's are really programs and thus should follow the other guidelines presented in the book (the most obvious being to comment them).
/m (PBP pgs 237-239)
Perl should behave the way most people think it will behave. And thanks to common line-based UNIX utilities like sed, grep, and awk the default Perl behavior for ^ and $ will not behave as expected (by most people). So use /m to align expectations.
/s (PBP pgs 240-241)
Pretty much the same argument as used in /m -- Perl should behave the way people think it will behave.