/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.
In reply to Re: Best practice or cargo cult?
by Argel
in thread Best practice or cargo cult?
by robinbowes
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |