What makes Perl great?

I really do think Perl is great, the community is great, and Larry Wall has planted the seed for an awesome community that won’t be going away.  However, I will first present the dark side of Perl, especially for the beginner (like myself).

If you have done some shell scripting, C, C++, and Java and want a powerful scripting language to add to your arsenal, or have a quick project you want to implement, Perl is NOT that language. Why? Well based on personal experience…  but what initially made me make this decision was this article: http://www.artima.com/intv/aboutmeP.html.  From the article…

They say you can hold seven plus or minus two pieces of information in your mind. I can’t remember how to open files in Java. I’ve written chapters on it. I’ve done it a bunch of times, but it’s too many steps. And when I actually analyze it, I realize these are just silly design decisions that they made. Even if they insisted on using the Decorator pattern in java.io, they should have had a convenience constructor for opening files simply. Because we open files all the time, but nobody can remember how. It is too much information to hold in your mind. –  Bruce Eckel

Other things include, the mindset of Python to make the programmers life easier and the command line interpreter.  That thing is great!!  Everything is just easy.  From personal experience I was able to pick things up almost instantly and apply python idioms.  Also, OO programming is fully functional, and this gives python a huge win over Perl for me.  Also, thought arguable, Python produces more readable code and conventions are few and simple to follow as it is quite structured to begin with.

Of course, by now you are saying,  “I thought this was a blog post about Perl!??!?!.”


Yes, it is.  I am a beginner and this is from a beginner point of view on both Python and Perl.  What do I love about Perl so far?

  • Context Sensitive programming.  This is an awesome concept.  One that takes place often in spoken languages, but not typically present in programming languages.  This is also a downside, because it’s harder to understand what is going on, but as people learn a language it gives them room to improve where in some other languages you’ll reach peak performance quickly and not have much room for improvement in productivity because of the rigid standards imposed upon you.  (EVEN FOR SIMPLE TEST/PROTOTYPE PROGRAMS).
  • CPAN, CPAN, CPAN, and CPAN. CPAN and Perl are basically synonymous.  Anyone who has used Perl for a day will discover CPAN.  Of course, other languages have something similiar, but nothing is beating this defacto standard to my knowledge.  In fact, after doing a very small amount of research… all I see is complaints because no one can implement a fricken package manager for their language when they’ve had CPAN staring in their face for years.
  • Perl regular expressions are top of the line.  To my knowledge they can’t be beat.  Though… I have yet to need such power.
  • Perl makes reading code easier once you know it.  Yes, I said that…  and I may be wrong and I may take it back.  But the way I see it all those symbols look like giberesh because YOU CAN”T READ.   Once you learn it all those distiguishing symbosl will make things easier to read where other languages are hard to decifer because things do not look different in different contexts…
  • Perl 6.  This is an awesome community to be a part of and Perl  6 looks exciting.

I am not a one language guy.  I plan on going to deeper into several other languages and once I have the insight I will share more in depth arguments, but for now, the way I see it:  use python if you want to get something done and don’t have the time to learn intricacies, but if you want something that will have long term value in many environments, perl is a great choice, and is hands down the best community that I see out there right now.  C, C++, and Java are there, and you should know about them, but I’m more and more leaning towards avoiding them as much as I can until I have to use them.  The situation where we “have” to do this is quickly declining.

I will add a link here to a future article I want to write on an overview of tools and setting up your environment using VIM.