in reply to Perl On Server

From the error message, you can see that the text Apache doesn't like starts with "connect". The string you pass to 'die' is capitalized, so if the database connection failed, you'd see "Connect" in the error message. So your database connection is fine. Your only problem at this point is, indeed, the HTTP headers.
s!!password!;y?sordid?binger?; y.paw.mrk.;;print chr 0x5b ;;; print;print chr(0x5b+0x2);;;;;