I learned perl before I learned php, and though they are very similar, I think php is much easier. It's less learning syntax and more just programming (for example perl has 3 different symbols: one for a string/number ($), an array (@), and an assossiative array (%) while php only has one, $).
You can connect to any kind of database (postgre, oracle, mysql) using perl, you just have to find the right module (
http://search.cpan.org/doc/JWIED/DBD.../DBD/mysql.pod). I know php can work with postgre and mysql, and it probably would work with all the others, but I'm not sure because I've only used it with mySQL.
Also, you can connect to any mysql server from in your script so your database doesnt need to be on the same server as the script. If your host doesn't offer it you might be able to find someone else who does.