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 );
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).
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||