I make way too many typos when writing code, and I'll say that I tend to classify them in the following manner, in no particular order:
Those items completely slip through both use strict; and use warnings;. Take for instance the following: #@array contains an odd number of values.
my %hash = ( key => @array );
# when you meant to say:
my %hash = ( key => \@array );
# or
my %hash = ( key => [@array] );
This item includes just about any logic error, too.
Those items that generate useful error messages, provided you had both use strict; and use warnings; in place. (too many to list). As things go, I like these, much better than the others.
Those items that generate error messages, even without use strict; or use warnings. Of course, this group should never matter, as there's really no excuse for not using strict and warnings. (when you need to shut a warning off, fine, but just shut off the particular warning you need, in the limited scope that it's needed).
The items that throw errors, but they're either useless errors that you can't easily trace, or they point you to some line number that's functionally useless: Missing right curly or square bracket at line 3281.Okay, it's not useless, but it's something when the error message tells you something's wrong, but you have to do some real digging 'till you actually find where the problem is, and just what you've managed to do wrong. (this includes any of those error messages where it takes more than 5 minutes to track down just what went wrong).
-
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.
|