Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When we did web development in 1996 it was CGI, FCGI and Perl on the backend. Now why is Perl not that popular anymore and instead we use Java, Python, Go, PHP, C# and everything but Perl? To me it seems that Perl should be good since it has had long time to mature. What happened that causes Perl to lose its applicability as server language?

share|improve this question

closed as primarily opinion-based by Glenn Nelson, gnat, GlenH7, Euphoric, Kilian Foth Aug 24 '13 at 19:49

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

If "long time to mature" was what mattered, we'd all be coding in COBOL. – Steven Burnap Aug 24 '13 at 16:57
Because Perl was written by a crazy person – aaronman Aug 24 '13 at 16:58
Because since the 90s, the discipline of computer programming has matured a bit, and people have gained a better understanding of the importance of readability. This has led to messy languages like Perl and C++ falling into disfavor. – Mason Wheeler Aug 24 '13 at 17:01
Also, your premise is a bit flawed. Java, Python and PHP are all around 20 years old, while C# is over 10. All four are quite mature. Go is not mature, but is only popular in the sense that many people are intrigued by it. It's not yet a common language in production. – Steven Burnap Aug 24 '13 at 17:10
To answer the new question - it's not that perl is outdated, but cgi and fast cgi are outdated models. – user40980 Aug 25 '13 at 14:08
up vote 7 down vote accepted

The model for web programming in the 90's was to launch an application that used the common gateway interface to launch another process that was forked by the web server.

Forking a process is a rather heavy weight operation. For perl, this means spinning up the interpreter, running it, and then letting the process terminate. When working with heavy loads, this became prohibitively expensive (memory and cpu).

FastCGI reduced the overhead of CGIs by reusing the process, cutting back on the heavy forking of a process. This is more inline with application servers, which leads us to...

The development approach today is to have an application server in a language that has a light weight process threading model, which can handle very large loads (compared to the days of CGI). Of these you have Java, Go, and C# which follow this approach.

This doesn't mean perl is out. There are application servers for Perl. One rarely hears of Catalyst compared to things such as Zope, NodeJS, or the plethora of Java App servers.

Part of this is timing. While the development of Java application servers was going on, Perl has been a bit bogged down with work on perl 6 (any day year now) and so the community as a whole let that development path slip by.

I personally discount the discipline of languages as a reason that perl has missed out pointing to javascript, php and ruby as three examples of similarly undisciplined languages that remain popular in the web area.

Languages such as Java and C# (and to an extent, python) with major company backing (Sun/Oracle, Microsoft, Google) and, yes, more discipline in the language are more appealing to enterprise development.

share|improve this answer

For the same reasons that everybody is writing everything in Java, Python, PHP, and C#... you use the right tool for the job at hand.

Perl really can do anything that you need it to. I mean, Movable Type and Markdown are both widely used pieces of software that are written in Perl, and they are completely different.

The reasons some people don't use Perl are mainly subjective (ugly code, difficult to learn, etc.) but you can say that about any language.

share|improve this answer
I can't confirm ugly code, difficult to learn at least for Cobol, C and the 370-, Z80- and CDC-Assembler language. – ott-- Aug 24 '13 at 18:53
@ott-- That was interesting, can you elaborate? My colleague next door was a 100 % Cobol programmer. I like C, Java is too large. – Programmer 400 Aug 25 '13 at 13:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.