Welcome to the wonderful world of programming :)

If you plan "to fix all of those problems", try to create some test cases based on the current code. When you changed the code, you can run those tests again, and if it produces the same output then you would be safe. Creating the test cases also helps you understand the code ... since there is probably no documentation on its functionalities.

I hate SQL. Why? Learn it and use it. You won't come far with hate :)

In other languages like Java, C, C++, etc. there is a so called block comment, which allow you to comment out a number of lines which is not used. There is no such thing in perl, but there is POD which allows one to do the same. And people uses it to disable code temporary. But after a while they forgot about it, and the temporary code stay there forever ... till you/someone touch it :)

=pod everything between pod and cut are treated as comments =cut

Keeping unused code as comments is not a good way, but people just do that.

As a consultant I was some day hired by a big company to speed up and improve some application they have. After a few days of getting acquainted with things, i was asked to fix a bug which sometimes happens ... Looked at the code, it was full with warnings, the bug was caused by calling an undefined subroutine!!! Since it was not in a normal flow it didn't show up every time ... Also, the code was written by someone who don't know how to create and use packages, the result was that he duplicated everything in +/- 20 .pl scripts! If you need to change something in a common subroutine you have to do it 20 times. WTF! It took 3 months to refactor most of the code, removed 50% of superflous and duplicated code ...

Don't worry too much about it, make a plan and just do it ... if you need help or advice, you have found Perlmonks :)


In reply to Re: Using PerlPod Creatively by duyet
in thread Using PerlPod Creatively by samijoseph

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



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