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
...
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.
.