Why Perl is Used for CGI



Why Perl is Used for CGI

Why Perl is Used for CGI

Do you know why Perl is used for CGI?

Perl is popular for CGI because of its parsing ability. That is originally why Perl was used heavily for graphics programming.

Perl is not ideal for CGI. So why is it used for that?

When CGI was first taking off, Perl was the easiest language to use for CGI.

Why was that?

Because Perl files were text files, it could be quickly uploaded and shared. Given the massive amount of data processing involved for CGI, that mattered.

Perl has been around longer than CGI.

Perl was already popular by the time CGI scripting took off.

Popularity is not enough. Fortran was popular, and its gone away.

A Perl script is mostly the same on any platform the admin uses, kind of like Java or JavaScript scripts. And Perl was popular with CGI because it had socket support.

What? Oh, for a moment, it sounded like you said sock support.

Perl has excellent pattern matching capabilities, too. It handles form data well, as well as text searches.

I can see where that’s useful in CGI.

Perl has flexible text handling. It can handle memory allocation and de-allocation, and you don’t have to worry about copying or creating new strings.

I think that’s because Perl was originally used for system administration.

Another benefit of Perl was that it came with almost every hosting service.

If programmers used what was already there by default, Windows would still be worth something.

PHP is starting to take over from Perl.

Because it is pretty much everywhere, now.

Perl took over CGI because it was the best tool for the job. Now that there are other, better tools, it is losing out.

So it was the least, worst tool for CGI at the time. And now it still used by sheer inertia.

Just like Windows.

Comments are closed.