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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.