A lot of newcomers to perlmonks don't seem to know about the <code> tag. How about adding a check in the posting module so that if 1) a post looks like it contains perl code, but 2) it doesn't contain any <code> tags, then the user is either forced to edit the post or check a box affirming that the post is correctly formatted. This would help reduce the number of considered nodes.

The key would be coming up with a good perl code recognizer. I'm sure there are some pretty sophisticated ways of doing this, and I'd be very interested in seeing how it could be done using advanced CS/machine learning/statistical methods, but perhaps something as simple as the following would suffice (at least initially):

sub contains_perl { $_[0] =~ m/[\$@%]\w/; }
Other factors that could be taken into consideration include: I'm relatively new here so perhaps this has been thought of/tried before. Comments?

In reply to newbies, <code> tags and recognizing perl by pc88mxer

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.