I was looking for the current de-facto standard on what I do when I post code samples
Ah, I see. Not sure if there's a "standard"... what I do differs depending on the situation. If the wisdom seeker's troubles would be helped by strict and warnings, or even if they are just new to Perl and post code without the pragmas enabled, they should of course be reminded to enable them (my personal opinion is that they're something that only experienced Perlers should turn off). If I'm posting whole scripts, I include the pragmas along with the shebang line, but when I'm posting short code snippets of a few lines meant for copy & pasting, and which should run the same with or without strict and warnings, I usually test with the pragmas enabled (I invoke Perl as perl -wMstrict) but omit them from the post for brevity. But that's just my approach, other Monks do it differently, but as far as I can tell most people seem to follow the "best practice" of enabling strict and warnings.
In reply to Re^3: Is pushing strict and warnings still relevant?
by Anonymous Monk
in thread Is pushing strict and warnings still relevant?
by stevieb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |