For hobby purposes, I have a shared space on a hosting server that is providing, as many of them are, both PHP and Perl CGI. I have read on several places that CGI scripts
Both PHP and Perl have their moments, but this is truly subjective. Perl has massive frameworks available on CPAN which can make it work as well, or better, than PHP, even in a purely CGI environment. At the same time, PHP has a large following, and a ton of out of the box features to make website programming simple. The choice, to me, boils down to personal preference. I personally prefer to use Perl than to muck about with trying to find all of the functional ways to do things in PHP. Good luck!