The code itself isn't extraordinary, but the task was quite large: a company I used to work for had a site written back in 1995, good ol' HTML 1.0. All the navigational headers, footers, and links were hard coded into well over 1000 pages; unfortunately, all of which were hand produced at different times by different people. They all looked the same, but the HTML behind the scenes was veeeery different at times. Enter perl, center stage: after capturing a recursive directory search of all html and shtml content, I wrote a script to open each listed file, scan for a variety of conditions within each (usually ill-formatted) page and make the necessary adjustments to a standardized format now using SSI to greatly reduce the headache. Less than 200 lines of code and a less than 1 minute run time. It missed a few of the pages that were *really* bad on the inside, but it also reported those to me, which I could take care of on my own. Major time saver.

In reply to HTML 1.0 Facelift by Anonymous Monk

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.