Flag This Hub

Learning Perl - why you should even if you'll never use it

By



In my hub about furthering your programming education, I briefly mentioned Perl. I'd like to expand on that recommendation here.

First, as I noted at that other piece, I recommend that you study Perl even if you have no intent of using it ever. That may seem like an odd thing to say: why learn something that you might never use?

The reason I say that is that Perl has an incredibly rich mix of features and a very easy learning curve. You can use Perl at a very amateur level and build your professionalism upward from there. I can't think of any other language that is so forgiving of beginner's mistakes and yet can be set to be rigorously demanding of perfect code.

If you are already a stickler for variable declaration and modules, you can enter Perl with that mindset and learn without every letting it be the sloppy mess someone like me will make of it. It is therefore ideal for any personality style.

Larry Wall

Larry Wall created Perl. He did so for his own amusement and programming needs, but went on to share it with the world. As I noted at that other hub, Larry is genius squared. He is so bright that he can be difficult to read - his clever jokes in "Programming Perl" will often fly right over your head, especially when you are new to Perl.

Larry is also a religious person. He's so religious that he's apt to make even other very spiritual people roll their eyes a bit. That's just Larry. It doesn't affect his genius, so we can put that aside. I just wanted to warn you in case you ever run across something he wrote in that vein and it makes your jaw drop.

I do want to mention another aspect of Larry that might be related to that, however: Larry may have found a bridge too far.

Perl 5, Perl 6

If you have Perl, you probably have Version 5. On my Mac system, I'm using Perl 5.12 and on my Linux box, it's 5.10.

Larry started working on Perl 6 in 2000. I can well remember his speech about Perl 6 in 2003. I remember it - I didn't understand much of it then and I still don't to this day.

You might say that Larry didn't either. It is now almost twelve years later and Perl 6 is still a work in progress. As backward compatibility was not part of Larry's goals, Perl 6 may never be of much interest - the ubiquitous success of earlier versions is likely to thwart it.

Larry is also well known for his manifestos on various subjects. If you are a programming geek who is fascinated by trivia (and you should be if you expect to be a good programmer !) you'll want to read every one of them. Of course you'll need to know a bit about Perl to understand him (and even with that, understanding can be a challenge), so by itself, that is an excellent reason to learn more about Perl.

Ubiquitous and Useful

As I alluded to above, you can write tight, structured Perl code. That's not me and never will be, so that's the last I'll have to say about that. I'm not denigrating the value of that, but it's not something that fits my personality. I'm a programmer slob. Hate me if you will, stop reading now because I'm an inferior person and a fool if you must, but that's the truth.

For those who decided to stay, Perl is found everywhere. It will be installed on every modern variant of Linux, Unix and BSD as well as Mac OS X . The only place you won't find it out of the box is on Windows, but Microsoft isn't smart enough to install ANY decent programming tools anyway. It's easy to find Perl for Windows; it just doesn't come with it.

Unless you go out of your way to make operating system dependent calls, your Perl scripts will happily run across all those operating systems. That's pretty impressive right there. Your Perl skills will take you anywhere you want to go.

If you aren't going to be a constipated stickler for buttoned down programming, Perl is a quick study too - you can be doing useful things in just a very few minutes.

If you must be a stick in the mud (there are good reasons to be so, I will admit), it will take you just a little bit longer, but not much.

Perl Cookbook, Second Edition
Amazon Price: $27.55
List Price: $49.95
Learning Perl, 5th Edition
Amazon Price: $34.51
List Price: $39.99
Learning Perl
Amazon Price: $21.49
List Price: $39.99
Randal Schwartz's Perls of Wisdom
Amazon Price: $20.63
List Price: $34.99

Perl Books


You have to own the "Camel Book", which is "Programming Perl". You won't understand 80% of it at first, especially the hidden jokes in the code, but it will become your primary reference and even the most obscure jokes will become clear eventually.

You'll also want the "Perl Cookbook". This is indispensable for the new Perl programmer.

I love Randal Schwartz for Perl. He's smart, fun, and easy to read. He wrote "Learning Perl", "Intermediate Perl" and "Perls of Wisdom" and you'll eventually want all of them.

Perl One Liners

Although usually beyond the ken of beginners (and some of these make me scratch my head too), Perl is well known for its "one liners", which are short bits of code you can bang off for quick results. Most of these are Unix/Linux oriented, but not always.

Do a Google (or Bing if you must) search for "Perl one-liners" and prepare to be amazed.

Obfuscated Perl

You won't appreciate this in the beginning - well, actually you may NEVER appreciate it - but there is a subset of Perl programmers who enjoy torturing themselves and others by deliberately writing horribly complex Perl code. You can find representative samples of Perl obfuscation at PerlMonks.org and there used to be a yearly contest to find the best - or was it worst? - examples.

Just do it, you'll love it

I hope I've sparked your interest. I love Perl.

Oh, I have to share this with you. I just did a Google search for "Why I love Perl" and not only found my article of that title in the results, but it has my picture beside it. That's the first time I have ever seen that happen.. nothing to do with Perl, of course, but it was exciting.

You can read my article and I hope you will, but read some of the others that come up for that search, too. You'll see why so many people know what "tim toady" means.

Wow - Search results with an Authorship picture!
Wow - Search results with an Authorship picture!

Save this for later

You can watch this video when you have a bit more Perl under your belt. You can watch it now if you have some appreciation of physics, but it will be much more fun if you have a bit of Perl.

The title is "Temporally Quaquaversal Virtual Nanomachine" and it's definitely the most fun I had in 2011.

Comments

Gypsy Willow 4 months ago

Pearls before swine here I'm afraid even though I was a programmer on the IBM 360 and 1401 back in the day! My iPad keeps correcting my spelling and won't let me write per l.

Pcunix 4 months ago

Yeah, I know that problem :-)

Sometimes I shut that feature off if I'm writing code or techy stuff.

Submit a Comment
Members and Guests

Sign in or sign up and post using a hubpages account.



    Like this Hub?
    Please wait working