First, I'm pretty new to perl. I've done some simple stuff, like search and replace, and minor text formatting, but nothing even remotely advanced.

I have a perl/MySQL site that was written in Perl 5004-1. I've been tasked with migrating it from the contractor. My server is running perl 5.8.1. Most of it works fine, though I had to comment out instances of CGI::use_named_parameters. (Will that break anything??)

There is at least one section of the site that does not work. When a form is submitted, a query is run. The script calls itself, and then draws the results page (I think) based on the presence of certain variables. The results page draws the template areas of the page, but nothing in the content section, which *should* contain some hard coded HTML, and the results of the query. No errors are reported. When perl is called with -w or -W, the only warnings thrown are:

Name "main::formlist" used only once: possible typo at htgmsrch.pl lin +e 9. Name "main::dbh" used only once: possible typo at htgmsrch.pl line 165 +.
Both of these variables (I think they're arrays) are first used in a file that's require()'d earlier.

Basically, my questions are: Why doesn't it count the formlist and dbh in the require()'d file, and How do I go about troubleshooting this, if there are no errors?

In reply to Migrating app to newer perl by CHRYSt

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.