On Perl

I believe that I first encountered details of the Perl programming language in the pages of The C Users Journal. I suspect that it was Sydney Weinstein’s article “A Perl of Great Price” in the April 1990 issue of The CUJ. At the time, I was developing software professionally using C almost exclusively. Perl’s use of various sigils and symbols were offputting for me. I didn’t give the language too much thought after that.

Fast forward to 1994/1995. Consumer access to the Internet and World Wide Web was reaching the masses. I built my first website on a local ISP’s presence. I wanted to learn about writing dynamic web pages using the Common Gateway Interface (CGI). I learned how to write CGI programs using C, but I found that Perl was also a popular choice for writing these kinds of programs. I happened upon the Sams book Teach Yourself Perl in 21 Days, which others had said wasn’t a very good book. For me, it was good. I worked through a lot of the chapters pretty quickly and I learned a lot. Soon, I found that I actually enjoyed using Perl. I also picked up the various O’Reilly Perl books. I soon took on contract CGI work as a part-time endeavor.

The Usenet group comp.infosystems.www.authoring.cgi was a helpful place for CGI’ers to discuss different sorts of things. It was also a handy place for me to find new contract work. As I implemented Perl solutions for people, I found that the Perl and CGI configurations on different servers were often different enough that I had to sometimes approach things a little differently from job to job. I believe some sites still had Perl 4 running. I believe that Perl 5 introduced OOP, which I hadn’t really used in my CGI scripts, so it wasn’t a big deal. The way that one placed the files on the servers often differed. You might place the Perl files in a “/cgi-bin/” folder … you might need to give them the extension “.cgi” or the extension “.pl” might be defined by the web server as a CGI script. In some cases, one didn’t need to place files in a special folder … the “.pl” files would execute as CGI anywhere under the web hierarchy. I used to use the succinct library cgi-lib.pl for the portions of my code that needed CGI-specific functions.

I wrote Perl scripts for a number of years, but other technologies arose that became more popular. I enjoyed using Perl enough that it was kind of my first choice if I needed to do something quickly, even for non-CGI tasks. I used to carry around a three-and-a-half-inch floppy diskette with a Perl 5 interpreter and a handful of utility scripts on it. I found it handy when working with infrastructure engineers on Windows systems to be able to have them copy the interpreter to their machines so that I could help them out by writing a quick utility here and there.

I used to write articles for a number of professional programming journals. Through those connections, I ended up acting as one of the tech reviewers for Scott McMahan’s 1999 book Automating Windows with Perl. That was a pretty good experience. I got paid to read a new Perl book before most folks did, I got to send my comments and such through to the author, and I got to see my name next to Randal Schwartz’s name. Randal was a famous Perl guru of that era who also was a tech reviewer of the same book.

I enjoyed reading the publication The Perl Journal, a magazine for Perl users. In a way, it reminded me a bit of the 80’s era when people from all walks of life were learning to program in BASIC for one reason or another. The magazine used to feature articles on very diverse problems that were solved using Perl. I found it all to be very interesting.

I entered an obfuscated Perl coding contest that the magazine held. I took second place in my category. A collection of a number of articles from TPJ were collected into the book Games, Diversions & Perl Culture (“Best of the Perl Journal”) published by O’Reilly and Associates. I was quite pleased when I found out that my snippet of obfuscated code (and my name) had appeared in an O’Reilly book.

I continued being a loyal Perl hacker for a while, but the future of the language seemed to be in question. I read a number of publications about the future version “Perl 6” and what features it would have. This project seemed to take forever. If I recall correctly, it really took about fifteen years from those early announcements to the first solid implementation of the language. The changes made to the language were significant enough that the new language would be called “Raku.”

During this time, Perl fell out of favor for me. There were a lot of handy utility languages that seemed to be able to evolve with frequent updates. I’m talking about Python, Ruby, and a number of others.

About a year ago, I had a text-processing task that I had wanted to complete. I was going to build a software toolset that I could reuse for projects similar to the one at hand. On a whim, I decided to give Perl a try. I installed Strawberry Perl on my Windows laptop and I began fleshing out the script. It was a perfect tool for me. It took me a little while to re-acquaint myself with the language and libraries, but once I did, it was more natural for me to use than a lot of other programming languages I’ve used recently for text-manipulation tasks.

I won’t say that the code I’ve written is idiomatic, based on modern Perl standards. However, it still seems to work very naturally for me. I’m not quite sure how Perl fits into any future projects, but it was indispensable for me several decades ago.