Okay, So after going through the perl, I am now beginnging to see the light. The sql, I am going to assume, (and verify later) is full of useful, albeit unnessacary functions that can be replicated without figuring out 1200 lines of sql. Which brings me to my next point. The code is broken into several subroutines, (actually, 8 to be precise), and the execution runs 4 of them in sequence, then emails the results (good or bad) to the owner of the file. If nobody minds, I will process my thoughts here, and subject them to criticism for robustness.


First Subroutine: initVars
Percieved Usage: To initialize variables (hey, I got one!!!)
Actions:
subroutine 2: filterUnWanted
Percieved Usage: to filter out unwanted files?
Actions:


subroutine 3: checkRecovery
Percieved Usage: to see if script ran fully last time.
Actions:


subroutine 4: processFiles
Percieved Usage: to process and verify all data in input files, and insert if good, email if bad.
Actions:


subroutine 5: processLogTable
Percieved Usage: takes all information from the log table in the dbase, and writes them to the log file
Actions:


subroutine 6: removeCtrlChars
Percieved Usage: to remove all control characters from the file by making a bunch of sed calls.
Actions:


subroutine 7: errorInLine
Percieved Usage: called when a line is found to have an error in it.
Actions:


subroutine 8: abortScript
Percieved Usage: called when an error is generated that prevents the script from continuing
Actions:
(I'll update more later, or if you all dont want to listen, I'll stop).

thanks!
E-Bitch

In reply to Code Breakdown by E-Bitch
in thread Seeking advice about learning another's code by E-Bitch

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.