Over the past week I've read "Modern Perl", and will finish it later today:<p><a href="http://onyxneon.com/books/modern_perl/" rel="nofollow">http://onyxneon.com/books/modern_perl/</a><p>The ebook/PDF edition is free! It's a great book for learning (modern) Perl basics if you're already familiar with programming concepts and another language like JavaScript (which is where I'm coming from).<p>Actually, I think the knowledge and best-practices gleaned from the book will help to make me a better programmer in a general sense (not just in terms of the Perl language). It's well written, a pleasure to read and I highly recommend it.
Perl is a really great language that i came to love over the years.
First, I've been writing PHP stuff then moved to Perl and experienced Java,Actionscript,Javascript,Objective-C,Python...
But all of them, Perl was the most powerful and expressive language.<p>For those who learn Javascript, Perl object literal notation
should be really easy to get and if you do some jQuery stuff, many things should come naturally to you somehow. Perl supports packages, closure, utf8 since many years whereas they are just coming to PHP (It's a real pain to go back to PHP for some projects... as it looks like a huge trash of functions in the global namespace with no cohesion at all... working with array_<i>, mb_</i> or preg_* functions is such a pain... hopefully the doc helps in understanding the quirks of the language).
The integration of regex as an operator is so nice.
q[] or qq[] helps quite a lot and I quickly miss them...
Controlling each instance of the program flow in code is very powerful too.<p>I guess the very minimalistic OOP system shipped with Perl did not help get Perl across the board of a wider range of company...<p>Obviously, this le/gend/ary image of unreadable code that one-liners, and to some extend sysadmin community, gave to the language has left a very bad taste in the mouth... and it is now very hard to get rid of.<p>when you look at <a href="http://mojolicio.us/" rel="nofollow">http://mojolicio.us/</a> or <a href="http://perldancer.org/" rel="nofollow">http://perldancer.org/</a> for web development, Perl::Critic that analyzes your code for bad coding habits(JSLink like), perltidy that reformat your code to follow your conventions or Devel::NYTProf to profile every line of your code...
I don't even talk about CPAN that has always get the job done for me in like 90% of the case...<p>I still have to find a language that offers such a powerful ecosystem.<p>And for those who wonder, Perl is very active here in Japan.
If you <i>really</i> want to learn Perl, you <i>must</i> install the read-eval-print loop (REPL) utility. If you have never used this utility, I will have serious grounds to doubt your Perl skills.<p>Unlike Ruby or Python (or most other modern high-level programming languages), Perl does not come with an interactive REPL shell, which makes no sense at all, since, due to Perl's obscure syntax, someone trying out Perl would benefit at least twice as much from a REPL shell than someone learning Ruby or Python. Fortunately, the Devel::REPL package remedies this. Installing it is super-simple:<p><pre><code> $ sudo /usr/bin/perl -MCPAN -e shell
> install Devel::REPL
</code></pre>
Once installed, simply open your terminal and run:<p><pre><code> $ re.pl
</code></pre>
Once you have the REPL shell running, you can pretty much copy-and-paste into it examples from this tutorial (or any other) and watch what Perl has to say in response.
I've been working with Perl programmers for just about ten years now and the one thing I've sadly learned is that while many folks claim to know Perl, but only a small group can do it well. (although granted you can apply this reality to any other programming language)
Perl rocks, I can testify to this: <a href="http://4.bp.blogspot.com/_Vtq6sCdzyKs/TK8Fooqqt9I/AAAAAAAAAGY/AdcMq7zxYUA/s1600/solomon_single_server.png" rel="nofollow">http://4.bp.blogspot.com/_Vtq6sCdzyKs/TK8Fooqqt9I/AAAAAAAAAG...</a><p>I built a 2D mmorpg using Perl and Erlang. The languages a lot of people whine about when it comes to syntax.
Syntax is the LAST thing I had to worry. I'm really happy that I chose those two languages.
I do wish he had mentioned the smart match operator ~~ as it nearly eliminates the confusion between EQ and ==. Of course, if you're dealing with legacy code, then you still need to understand both (or all three), but new coders might be well advised to start with smart match.
Nice concise writeup. The only important thing he missed as far as I can see is that the '..' operation can create anonymous arrays of sequences of characters too so 'a' .. 'z' gives you an array of all the letters between 'a' and 'z'.
Wish there were similar ones for all the other languages - PHP / Python etc. I always thought that most programmers and web developers experienced in one language can quickly pick up the major features of another lanaguage, if there was a quick overview of this sort. Know of any sites that do this? Maybe this is a great opportunity for someone to put together a site like that?
As an aside, the author's clarification [1] of the many terms related to the UK, Britain, etc. are very enlightening.<p>[1] <a href="http://qntm.org/uk" rel="nofollow">http://qntm.org/uk</a>
Sam, you've certainly made an enemy out of every member of the Perl community with this sarcastic and incomplete post.<p>Once you've gotten through OReilly's beginner Perl books and "Programming Perl", if you truly want to learn how to scale Perl in the enterprise, read Damian Conway's Object Oriented Perl. Once you can write solid consistent OO Perl, read "Apache modules with Perl and C".
Oh my why would anyone want to lean Perl anymore? Unless you are working with a legacy codebase learn Python, Ruby, Java, C#, Erlang, Scala, Haskell... in other words run the f away from Perl if you can unless you are into S&M.