Happy 25th, Perl !

camel
Today, I read that the venerable Perl programming language has reached its twenty-fifth year of existence.  Wow!  Has it been that long, already?

Perl and Me

I first encountered Perl in a programming trade magazine article in the late 80’s.  I wasn’t exactly enamored with the syntax and dismissed it as something I’d never really use.

Several years later, I found myself writing Common Gateway Interface (CGI) scripts for the NCSA web server in C and Perl.  I grew quite fond of the language over a very short period of time.

The First Book

The first Perl book I bought wasn’t one of the O’Reilly variety.  The book’s title was something like Perl in 21 Days by Howard W. Sams publishing company.  ( A current edition has a title similar to this with the word “Learning” at the beginning. )

I’d read many Usenet posts that seemed to indicate that this was a horrible book.  I found it quite useful.  In fact, when I got to the section about DBM “databases”, I had to stop reading and began to tinker.

CGI Scripting

My earliest CGI scripts were written on BSD Unix and Solaris as I had two ISP accounts at the time.  Most of the early ones fell into the hit-counter / message-board variety.

One of my hit-counters dynamically constructed a GIF file with the graphically-represented digits by spoofing the LZW compression in the GIF file format.  You can see the code here:

http://www.mailsend-online.com/blog/cheating-the-lzw.html

With my blessing, my primary ISP offered the script to their customers to allow custom hit-counters on their personal web pages.

I ventured into freelance CGI development for a number of years, mostly involving Perl.  The combination of configurations usually required some investigation of the host Unix system before I could even begin coding.

Some sites had Perl 5, some still had Perl 4.  Some had configured their web-server to recognize the suffix “.cgi” as a CGI extension, others simply used “.pl”.  Often, I could only drop Perl scripts into the /cgi-bin/ folders.  Sometimes, I could get around these configuration items by customizing a few entries in a localized .htaccess file.

My CGI library of choice was a whittled-down version of Steven Brenner’s cgi-lib.pl file.  I used it primarily to parse GET and/or POST parameters into a Perl associative-array.  Other versions supported things like form-based file uploads ( RFC-1867 ).  I stuck with just the bare request parser.

In November of 1995, I posted an item to comp.infosystems.www.authoring.cgi noting a CGI programming in Visual BASIC class that my company was offering ( yes … before ASP’s, one could write CGI’s in VB. )  As a side-note, I asked about interest in a Perl CGI class.  We came close to offering the class with me as the instructor, but I’m afraid we just did not drum up enough interest.  I believe Perl guru Thomas Boutell was offering CGI/Perl classes at the time.  Given the choice, I’d have picked Tom over me as an instructor… ;-)

At this time, I had picked up “the camel book” … O’Reilly and Associates Programming Perl:

pperl

It was the definitive Perl book of the day with O’Reilly’s “llama book” ranking a close second place.

I had been writing for a number of trade magazines at this time for M&T Publishing. An editor contacted me to see if I’d like to write a book for them.  I happily agreed and asked if I could write a Perl book.

Matt Wright, a teenager with a passion for Perl and CGI, had already written a book based on his collection of home-grown CGI scripts from his populate site Matt’s Script Archive.  Tom Boutell had also written a book on CGI in Perl and C.  I didn’t think that a CGI-only Perl book would be very popular with those two already on the shelves, so I wanted to write about Perl itself. I had envisioned something that was more of a cookbook with a dash of CGI and a dash of Windows-specific code as well.

Unfortunately, I was unable to give the book my attention, and had to decline to finish the book.  I did, however, act as a technical reviewer for the publisher on Scott McMahan’s book Automating Windows with Perl.

mcmahan

Unfortunately, a number of the reviews I’ve seen of that book were not positive.  I thought that the manuscript offered some interesting code, especially the usage of Microsoft’s Component Object Model (COM) via Perl.

As the book approached publication, Perl demi-god Randal Schwarz ( did you see his name on the camel book, above? ) was also contacted as a technical reviewer.  My name appeared next to his in the list of the book’s contributors.  As I understand it, Randal is now a Smalltalk demi-god.

In a short while, I found a new publication called The Perl Journal:

tpj7

TPJ was always a great read.  The articles were largely from people who were not primarily programmers but they used Perl for some portion of their endeavors.

During this time, frequent TPJ contributor Lincoln Stein had written a Perl module called CGI.pm … a Perl module that provided an object-oriented Perl API to use when developing CGI code.

I never really warmed up to OOP in Perl, so I rarely used the above module except when specifically requested by a client.

In the issue listed above, you’ll see my name as a 2nd place winner on the annual Obfuscated Perl coding contest.  You can see the breakdown of my entry here:

http://www.mailsend-online.com/blog/obfuscated-perl.html

That entry was reprinted in the O’Reilly book Games, Diversions, and Perl Culture:

games_diversions

I had finally gotten my name into an O’Reilly book!

When the web bubble had burst in the late 90’s, TPJ lost advertisers and ceased publishing.  I believe that O’Reilly and Associates bought the rights to the content of all of the published issues.

Declining Usage

My use of Perl then started to fall by the wayside in the early 2000’s.  Contracting sites made the competition quite fierce.  Other technologies, like PHP on Unix and Active Server Pages on Windows,  seemed to be easier for web hosts to use.  Clients began requesting code in either PHP or ASP, but not Perl.

I still used Perl regularly for data-mining, program automation, simulations, code-generators, …etc.  In fact, I still have a Perl-based HTTP server that I use for proof-of-concept coding.  However, my use of the language began to decline. I wasn’t keeping up with the various modules that were being introduced at the Comprehensive Perl Archive Network and wasn’t keeping up with growing web frameworks.

I had heard a lot about Perl 6 and the Parrot VM, but those technologies seemed to incubate in the larval stage for too long to hold my interest.

I look back on my usage of the language and am happy to have had the “Swiss Army Chainsaw” when I needed one.  Happy Birthday, Perl!  Perhaps it’s time for me to get back into the swing of Perl coding, eh?

$x="09001507";
for($i=0;$i<length($x);$i+=2) {
   printf("%c",97+substr($x,$i,2));
}
About these ads

About Jim Lawless

I've been programming computers for about 32 years ... 26 of that professionally. I've been a teacher, I've worked as a consultant, and have written articles here and there for publications like Dr. Dobbs Journal, The C/C++ Users Journal, and others.
This entry was posted in Programming and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s