Monday, April 03, 2006

PHP vs Perl

I started doing my web development using PHP because it was more like the languages in my background - ASP and C. The classes within PHP also made it more interesting than ASP and I used PHP for a while to make some interesting applications.

Lately, it seems that I've come to find Perl to be more interesting than PHP even though Perl seems more "rough" around the edges. Perl just seems to do things better than PHP and the libraries that other people write in Perl are more polished than those written by the PHP hacks. CPAN is a great place for finding modules that you need. It appears that people do a pretty good job creating interesting libraries with Perl in everything from drawing graphics on the fly to creating web spiders to connecting to databases.

I do have some gripes about Perl - notably the documentation tends to be a bit sparse. Google can be your friend in this regard, but it can take a lot of time to go beyond the basics of the more complex libraries when you start from scratch.

I used to think the Perl code was the most unreadable piece of shit out there, but I've now figured out that you can write decent looking Perl code. The developers are sometimes either crappy at writing it or are making it difficult to read for job security.