How often do you mention “Perl” to a group of programmers/software engineers and get that strange look on their face? I recently had that experience. I was meeting a few fellow programmers (who happen to be core Java developers) and casually mentioned that I was attending a Los Angeles Perl Mongers meeting later that evening. To my utter surprise, all of them seemed to be either disgusted or weirded out as if I had mentioned something completely absurd. Um..Did you just say Perl? They were of the strong opinion that Perl was an outdated, hard to use, hard to maintain, old school 1990’s scripting language and why would you even want to think about it in this day and age of Java, PHP, ASP and oh of course, the hottie Ruby?!? One of them even said with a funny look on their face, “You really like Perl? Do you write one of those long, crazy, obfuscated one-liners that are a nightmare to look at?” I was in shock. After all, these were highly seasoned engineers with years of solid experience working at top companies building cutting-edge stuff. They weren’t some recent grads holding the newest edition of the next AJAX or Ruby book. And they had such disgust and ignorance for such a beautiful language! Well maybe, this experience was a bit extreme, but rarely have I gotten enthusiastic responses. Unfortunately, this attitude is reflected by many (if not most) within the current technology market and it’s hurting Perl badly in many ways.
So, Why Perl?
The usual pluses:
- Cost: Software costs for deploying the entire LAMP (Linux, Apache, MySQL and Perl) stack – $0. For everything else in life, there’s MasterCard.
- Community: Perl community is filled with some of the smartest and the most interesting individuals.
- CPAN: The largest repository of re-usable Perl code. Enough said! (PEAR doesn’t even come close, although there are quite a few good modules available on there.)
- Open source: The entire Perl source code and its modules is available to be browsed or tweaked
- Availability: Perl is installed by default on almost all *nix platforms.
The solid pluses:
- Performance and Efficiency: mod_perl is by far the best thing since sliced bread. Also check out perlbal – a Perl based reverse proxy load balancer and a webserver and memcached – a caching solution – by Danga Interactive.
- Templating systems: There are a wide variety of powerful templating systems available. Take your pick from HTML::Mason, HTML::Embperl, HTML::Template, Text::Template, Template::Toolkit, Apache::AxKit and many many more.
- MVC Platforms: Just like RubyOnRails, Perl offers various MVC frameworks such as Catalyst, Maypole and Jifty.
These are a few of the advantages that just pop-up in my mind. The list is quite far from being exhaustive.
Some basic Myths:
- Perl is hard to learn and code: Just like any other language, Perl has it’s learning curve. It might appear in the beginning that since there are so many ways of doing the same thing, it’s all too hard to learn. Trust me, its not! It’s all about mental inertia. Once you start coding and reviewing a lot of Perl code, this will all seem natural. (Now, the whole Java world can be bewildering!)
- Perl code is hard to maintain: This is not completely true. Badly written code written in any language can be hard to maintain. I’ve had to deal with terribly written, completely undocumented, spaghetti PHP code. And good luck counting those indentations in Python. There are established Perl best practices and conventions that, if followed, can help immensely in writing elegant, understandable code. You break the rules, you pay! Simple as that. Doesn’t matter what language you code in. Don’t forget to check out the Perl::Critic module on CPAN. It offers an extensible framework for enforcing coding standards and best practices.
- Perl is slow: This one can’t be any farther than the truth. Have you heard of mod_perl? When it comes to squeezing out the last drop of performance from your Apache server, there is nothing like mod_perl (other than the C language, of course). My colleague Juan Natera has developed a nifty little demo to be presented at the upcoming SCALE highlighting the speed of Perl apps vs. other languagues. You can see the post here.
A little googling around will reveal that there are a lot of sites/articles on Perl advocacy out there. One particularly good link is here.
Here are my two cents:
- Get Perl 6 released (soon) and hype it up! Believe it or not, but Perl really needs to glam up this new release if it expects widespread attention. Most of the cutting-edge apps are written in Perl or use mod_perl, but how many times do you see “Powered by Perl” or “mod_perl inside” mentioned? You see the Python and Ruby communities do this quite often. 37 Signals, for example, has been evangelizing Ruby extensively. You see Python being mentioned a few times if you’ve ever subscribed to a mailing list using Mailman.
- The local Perl mongers are doing a great job of bringing the Perl community together. I love my Los Angeles Perl Mongers meetings. One thing I’d love to see more Junior to mid-level members being invited to present a topic. Of course, we all love to see Perl Gurus come and give us a talk – that’s always the biggest treat. But encouraging budding Perl developers to come and share their experiences or to research a particular Perl or related technology that they’ve just taken up and present it to fellow Perl Mongers. This does a few things: surely it pushes the “presenter” to get a better grasp of the topic being presented, which would involve extensive research, implementation and lots-n-lots of learning. Not everyone knows everything. Even if some people have used, say advanced OO Perl programming or Webservices in Perl, there are quite a few who’d love to learn more about it. There will always be an interesting audience available. I would strongly urge the local Perl Mongers to invite talks and presentations from the entire spectrum of Perl talent.
- More companies should hire and train programmers in Perl. There are companies out there that do that and hats off to them. They’re doing a great job of it. But most of the companies out there are looking for senior to mid-level Perl software engineers with quite a bit of experience. This doesn’t help those who want to grow and mature as Perl developers. Other technologies, such as PHP, Java or Ruby, have encouraged junior developers immensely. But then again, many of them don’t even come close to the quality of Perl Engineers
- Hackathons!! The Chicago Hackathon was a major success and we definitely need to have more of those.
- Encourage academia to include Perl in their courses. Most of the programming classes use or recommend using either C/C++ or Java for their projects.
Please feel free to comment and give your feedback. What are your suggestions as to how we can further the Perl advocacy? I’d definitely love to hear. Long live the Programming Republic of Perl






February 1, 2007 at 10:41 am |
i’ve sort of decided that my evaluation of Perl wasn’t entirely fair. Can you recommend some online resources where I can learn Perl, especially some ideas for practical usage?
Thanks
February 1, 2007 at 10:44 pm |
I’ve found that the best place to start learning Perl would be to visit http://learn.perl.org and read extensive articles on http://perl.com. Also, feel free to visit http://del.icio.us/nimishparmar/perl
These books are great to start off with:
Learning Perl http://www.oreilly.com/catalog/learnperl4/index.html
Programming Perl http://www.oreilly.com/catalog/pperl3/index.html
I’ve also found these websites particularly useful:
Simon Cozens’ Beginning Perl (Free eBook) http://www.perl.org/books/beginning-perl/
Mark-Jason Dominus’ (articles) http://perl.plover.com
Stas Bekman’s (Free eBook) http://modperlbook.com
Randal Schwartz’s (columns) http://www.stonehenge.com/merlyn/columns.html
November 21, 2008 at 9:05 am |
i use regexes a lot and a few days when i looked at some perl code,i was simply amazed by the ingrained access perl had for regexes (my background is in python). thanks for the links on perl.