Originally posted by GilesGuthrie
LM is right. The reason that Perl is in common(ish) use in web development is that pretty much all web servers were UNIX boxes in the early days. Even now, where Apache is dominant in the web server arena, it is UNIX-based.
Early developers were therefore able to use Perl (which was already running on the box) to add some back-end functionality to web sites.
Then came CGI (Common Gateway Interface) that was a set of standards for communicating between client and server, and which facilitated more two-way communication than was available with straight HTTP/HTML. CGI therefore is not a language, it is a protocol. Most CGI-utilising programs are written in Perl.
What I've written thus far basically alleges that Perl is in use in web design merely as an accident of availability, which isn't quite true. Because most web applications involve the transfer of text from server to client and reverse, Perl is ideally suited, because as a language it has very powerful text handling tools built-in.
A number of the advanced string manipulation functions within PHP are basically ported from Perl, but I would say that PHP was a better language to use, because it is absolutely designed as a server-side web language, and because its code can be embedded within the web pages, rather than being called by them.
That said, I know PHP, and I don't know Perl, so I won't be of much use in this forum!