Alex Rivera | Logout

When should I use Perl CGI instead of PHP (or vice versa)?

Asked 2009-05-05T12:56:15.813
18

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 are obsolete now, I think mainly for performance issues (like Is PHP or vanilla Perl CGI faster?).

But since I just started studying Perl, I wouldn't want to waste time on implementing solutions in PHP that are way easier (or only possible) in Perl.

Also there are the boilerplate issues, I'm aware of CPAN (that is the existence, not yet the content), but not familiar with PHP libraries (although I have no doubt they exist). I'm not prepared to write a login-procedure or basic user administration from scratch for the 10^10th time.

I don't the luxury at this point to waste a lot of time in research for hobby projects either, so I thought, let's ask the experts for a headstart.

Edit
Report

1 Answer

2

I use both Perl and PHP for websites - for historical reasons, mainly Perl at work and PHP at home; I don't think there is a lot to choose between them.

If your pages are mostly fixed HTML with only a small amount of computation, PHP is a bit easier, because it is embedded in HTML anyway.

I find PHP a more disciplined, and therefore sometimes more limiting, language than Perl. PEAR is very similar to CPAN - not as big, I think, but then CPAN is so big that it's got a lot of dross in it.

HTH

Colin

answered 2009-05-05T13:13:39.623

Your Answer