Last Saturday I was rewriting a script and was getting sick of all of the ifs I was using. My code was to the point that I was 12 tabs down. Someone once said that about 4 was the maximum, so 12 was a bit much. Since I was in a for loop, I decided to finally see if I could get the hang of using next. OMG! The depth of my code got shallow rather quickly. I went from a depth of 12 tabs to 7. I felt a bit of joy at that point. I just wanted it share with you all how happy that little insight finally saved me from plunging too deep and having fewer brackets made it easier to find where I am when writing my script. Now I'm wondering how much unnecessary depth I have elsewhere. I think I will go spelunking.
Have a cookie and a very nice day!
Lady Aleena
-
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.
|