The easiest trap to fall into when trying to figure out
what's wrong with a piece of code is to look for
all the things that are right with it. It goes
something like this: "Okay, if $i is zero we'll get
through this loop okay, ... the substitute will change the 'barf'
in $string to 'arf' ... yeah ... and when it gets here
it should print 77 ... right." This mental dialog always ends with, "Well,
shoot, that should work!" If I ever find myself
saying this, I know I need to back up and realize, "Hey, it doesn't
work, that's why you're going through this in the
first place!" That's usually enough to kick me into a different
groove.
-
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.
|