Home
Home

my $thoughts; rand ( $thoughts );

Dec 19 07

my $thoughts; rand ( $thoughts );

Paul Weinstein

Perl is now 20 years old. If your wondering what Perl is, Perl is a programming language originally developed by Larry Wall. This 20 year old scripting language became widely adopted for its strengths in text processing. In the world of Unix-based systems (Linux, FreeBSD, Mac OS X for ‘modern’ examples) most everything is a text file or stream of text. This means, given a language like Perl, anything can be manipulated by a simple script containing a few lines of code. Even before the Web made the Internet a must have in every home (and soon in every pocket) Perl was gaining a reputation as “the duct-tape of the Internet” for its ability to connect disparate systems together.

However, to say Perl is just a scripting language for text manipulation misses the point. In the past 20 years Perl has done well in keeping up with trends in the word of computer science. Perl 5 introduced object oriented programming among other things to the world of Perl increasing its flexibility and use. Perl can deal with text manipulation, process management, rapid prototyping of software solutions and – in my world of software development – is the backbone of web applications such as … Zoomshare.

I was first introduced to Perl back in the early days of the Web in the mid-90s while working part-time at a local computer bookstore. Being a programmer working my way to a CS degree I was charged with putting a copy of our book catalog online such that technically savvy users, are main customers, could search our catalog from the comfort of their own office. Text manipulation and web integration, the two main challenges of the task then at hand, put Perl on my list of languages to learn.

Having already learned Pascal and C I immediately felt at home with the Perl’s syntax. But what really made me feel all warm and cozy was Perl’s scripting background. As an interpreted language the natural give and take of working on a task; write, execute, debug, modify, execute again and the non-structured, free form methodology reminded me of my first programming language, BASIC.

What I mean is with a language like C or Java its almost a most have to work with an Integrated Development Environment (IDE). An IDE consists of a source code editor, a compiler and/or interpreter, build automation tools, and a debugger. IDEs can also included version control tools access to common libraries and blah, blah, blah. IDEs always seem to get in my way and I just never feel at home in any of the IDEs I’ve tried. I suspect I was poisoned by my Apple IIe as I learned Applesoft BASIC, sitting for hours just writing code, executing it, debugging and rewriting with nothing more than the command-line provided by DOS 3.3 or ProDOS.

That’s not to say Perl can’t be written using an IDE or that C must be done using a IDE. But given Perl’s background in the world of Unix where everything is text, why does one need a editor, Perl interpreter and everything else wrapped into one huge program when the platform already provides an editor (vi and/or emacs) and anything else, like the Perl interpreter which can be invoked by simple execution at the command-line?

As for the non-structured part, well while its not grand code if one writes in Perl in a non-procedural methodology, it is possible. While it can be a crutch it also means one can choose and pick a methodology as needed from object oriented to ‘spaghetti code‘.

That’s the thing about Perl. Many languages tend to specialized in one area or discipline. For example there are a number of web development languages these days such as PHP, Phyton or Ruby. Classic object oriented languages include Java and C++. There is the trusted procedural standby C. And anyone whose has explored the depths of Microsoft’s productivity suite Office has encountered VB. Yet Perl, seems to be able to do it all….

Its Perl’s blessing and its curse. But it does explain Perl’s underlying philosophy, that there is any number of ways to do the same thing.

Here’s to the next 20 years of Perl.