Juerd wrote: > Robin Bowes skribis 2006-06-20 14:16 (+0100): >>> Let's not discuss this in too much detail, but my strong opinion is >>> that including /xms by default is a very bad idea. Use them when you >>> *need* them, and only then. >> Why do you think that? > > It's carco cult programming.
? Ah, car*g*o cult programming, as in http://en.wikipedia.org/wiki/Cargo_cult_programming I disagree - it's good practice. I always "use warnings" and "use strict" in all my perl code. Is that cargo cult programming too? > "/m" is only ever meaningful if your data has multiple lines, ...but harmless if it doesn't, so it's good practice to use it consistently. > and "/s" makes matching [^\n] incredibly inconvenient, while that's a very > common thing to match. Huh? You just did it: [^\n] - any character except a newline. What's inconvenient about that? And that's a damn sight clearer than using "." and relying on the default behaviour (that "." doesn't match newlines). >> Conway's reasoning is as follows: > > I know. > >> Which parts of this advice do you disagree with, and why? > > The "always" parts. Know what /m does, and use it when you need it. Know > what /s does, and use it when you need it. Know what /x does, and use it > when you need it. Personally I don't think it hurts to use them all, all the time. But I guess we can agree to disagree. > If you really want to discuss this further, I suggest that you start a > thread on perlmonks.org and announce the URL. It's off topic here. http://perlmonks.org/?node_id=556406 R.
