Judging the use of strict and warnings by the presence of the pragmata alone is stupid. No my in sight in a longer snippet that uses multiple variables is a much better indicator. Global filehandles and two-argument open are additional red flags. Basically, I’ve seen enough bad Perl code that I can tell it by the “smell” I’m not even sure all of the hints I pick up on are conscious.
Though in general, unless the problem is obviously caused by a lack of strictures or would clearly have been pointed out by a warning, I only suggest that the poster may make his life easier by using them. And I’ve downvoted a fair number of nodes where someone just hawks about strictures and warnings when they obviously haven’t even taken the time to read the poster’s problem description and code. (I remember there was a thread recently where half a dozen people worthlessly posted about strict and warnings when the problem had absolutely nothing to do with that. Way to pollute the forum.)
Makeshifts last the longest.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|