in reply to mysql with perl or php

I ust both Perl (or is perl or PERL?) and PHP. For the task you have, PHP is better. For the most part its syntax is simlar to perl and where it differes it usually makes it simpler. If you're using Apache, php will be intergrated into the webserver instead of using the clunky cgi-bin directory. (You can use mod_perl and ePerl which I find to be almost as good as PHP, but there are more setup issues).

Leave Perl for the really complex stuff behind the sceens. PHP is designed for putting databases on the web. It doesn't hurt to learn another language either.