port 80 for MySQL looks odd, as has already been pointed out, can you confirm that you don't change the script between runs with and without mod_perl? You also could get some useful results from invoking the script from the command line on the server - you supply any parameters after the invocation in the form
param1=value1
param2=value2
...
and end with CTRL+D
This will prove at least that your script is correct - if it is then you shouldn't really have any problems with mod_perl. A tip: don't try to do the clever persistence and reloading stuff until the basics are working.
I'm sure you know already but there is a lot of good stuff at
Stas's Home Pages.