Fair warning for those interested in learning Perl...it will ruin you as a programmer. Before I learned Perl I was a pretty decent C++ guy, built most of the guts of an OS in Java as a fun project to learn the language, could hack out a little x86, MIPS, x68k and z80 and a couple specialty asms and knew a smattering of a half-dozen other serious languages.
Perl absolutely ruined me. Right after learning Perl for some text processing I was doing, I also made a career change into a technology adviser and analyst for a large R&D firm. 6 months into that new job I happened to have a need to process some data. They had Java and Perl on the machine as a leftover from the previous owner of the box (C++ environments were still fairly expensive back then, security wouldn't let me install Linux or Cygwin, and anything else wouldn't pass muster).
I didn't want to fool around with Java's file I/O mess, so I just picked Perl. I got shit done, a lot of shit. I got 5 awards from the firm in 3 years and a nomination for a lifetime achievement award and all I was doing was hacking up some one-off Perl scripts to crunch some data! I was much more familiar with C++ and Java, and I simply hadn't thought about how much I was accomplishing and with such little effort.
Over the next few years I quietly left behind all of the other languages and got into a serious Perl groove. Solving issues in a few days that were stumping teams of a dozen for months. I am not a particularly talented programmer. I built little web apps to scratch department itches that came up during meetings ("why isn't there an acronym database?", "I wish we had a meta-search engine that search Yahoo, Altavista and Lycos at the same time!", "I wish I could scan these documents quickly for all of the chemicals in our chemical warehouse", etc. etc.) Then I started solving harder problems. My Perl prototype code was often passed off to a team where it was rewritten in a "real" language, but since I was the one who solved the tricky problem, it was my solution that ended up being rewritten in C++ or Java.
Then came a time I needed to write something in Java based on a deliverable requirement. You know what? I couldn't do it. I don't mean technically, I mean mentally. everything seemed like a huge pain in the ass. The delta from thought to code seemed so drawn out that by the time I had put my thought down into code I had often forgotten what the hell I was coding in the first place. Simple exercises involving half a dozen lines of code and minimal thought turned into half hour long dives into the standard library docs...yes I said it, the Perl solution might be longer than the Java one, but the time to just code it out was an order of magnitude faster. I ended up in groove with Perl I simply couldn't achieve even after years of working in other languages. I finished the Java project and swore off "real" languages for good after that. I had simply been broken by Perl and ruined for good.
Perl just simply came together like how my brain worked. I could dump out ideas and it just worked...and I got shit done. With a little careful planning I could even tackle larger projects, a couple that approached a 100k lines of Perl (and had the annoying habit of running faster than the later Java rewrites, which eventually had to be rewritten in hand optimized multi-threaded C++ with in-line ASM to beat the original 5 year old Perl in performance)
It was the difference between typing text with a keyboard and handwriting all caps, backwards in a mirror, while translating each word from English to Russian via a English-French dictionary then French-Russian dictionary in the dark by candlelight.
All that being said the long Perl 5->6 winter had me reaching outside of Perl for a while into Python and it was "ok". I liked how my code was automatically readable and simple. The standard libraries are badass. But it just didn't have the there there that Perl has. The automagic flow from synapse to working code. I'm happy to see the community starting to pick back up but sadly I'm hopelessly locked in 2001 Perl and many of the idioms from that time. It would simply take too much of a time investment to get entirely up-to-speed with where Perl is today. I'd probably be better spending the time on something more marketable with better and more modern library support.
Here's the real kicker, I ended up using Perl to get really good at my non-programming (but still technical) job that it would probably take me years of dedicated effort to get back up to speed with where modern development is at all. I'm old enough now that I'd simply be much more comfortable managing modern developers than being one.
It was the difference between typing text with a keyboard and handwriting all caps, backwards in a mirror, while translating each word from English to Russian via a English-French dictionary then French-Russian dictionary in the dark by candlelight.
Likewise, and thank you for the story. I too came to Perl from C and ML and only later encountered Java. From 2008 I was completely blocked, barely wrote any code at all because I couldn't have Fun anymore.
It was not until I recently made myself learn Ruby and Erlang that I rediscovered the joy of programming.
I've been wanting to learn Perl for the past 2 years. I still don't have time, but in 5-6 months I'll be able to finish what I'm doing and start Perl (as a hobby, not a full-time endeavor!).
Some languages have a "magic" book or article, that you'll never learn anything deeply before reading it. For me and JavaScript, it was Douglas Crockford's "JavaScript: The Good Parts". It literally opened my mind when I read it last week and my Node.js code (which is in CoffeeScript BTW) would never be the same (hopefully it'll be an order of magnitude better).
Is there a magic book on Perl? And is there any point starting with Perl 6 (considering I don't want to write mission critical programs with Perl just yet, and don't mind to be an early adopter at all if the product will see the light of the day in the next 2-3 years)?
My weird suggestion: start at the beginning of Perl's great 5.x renaissance, Perl 5.6. Any book that explains that version's features, learn all of it. You will learn probably the most comprehensibly compatible version of the language you'll ever need, and you'll strengthen your basics before learning all the new goodies introduced in later Perls.
I'm the type of person that wants to write Perl once and use it almost anywhere. Lots of useful language features in later versions simply aren't supported on systems that didn't upgrade their stock Perl version (for example, Centos 5 ships with I think Perl 5.8.x, and the current stable is 5.16.x).
And if you're thinking "Oh, i'll just upgrade perl on that five year old legacy server," kill yourself now and spare the agony.
And as you already have an ePub version, I would like to suggest selling it (or giving it away free, as you already do) in the iBookStore as well. iPad is an amazing device for reading technical books, and I spend few hours every day reading ePub books in iBooks.app (I read Crockford's book and 3 other O'Reilly books just in the past 2 months).
Right now there are many Perl books in the iBookStore, but they're mostly cookbooks (step-by-step tutorial), not a no-bullshit introduction to the language as your book is! I'm sure many many more would discover or benefit from your book if it was available there as well :)
Very nice post, which rings true. I had similar difficulties learning my second language after a couple of years just using Perl. I must've made a serious effort at over a dozen languages over a period of several months, and while I can get by in most of these, it was only when I got into Scheme/Racket recently that I felt like I'd found another language that I could really connect with.
Luckily, I'm not a full-time programmer, so I'm in the enviable position of being able to pick and choose which languages I use, but I imagine things are much more frustrating for coders who don't have a choice.
Perl was my first language. After burning all sorts of fingers off using it (my workflow was edit/FTP/test in browser on a 14.4 modem), I was looking forward to the limited type checking C offered.
But, yes, it is wonderfully pragmatic. I've been a fan of loose languages ever sense, and managed to stay out of trouble even as a teenage hacker lacking taste. One exception: I ran a database off of a CSV-style file. With no locking mechanisms. Corruption ensued.
I've never been biased towards one language or another. I always recommend using the right tool for the job. With that said, I built Crowdtilt using Perl and the main reason was because we needed to move fast. Now, that I am here I don't even want to use another language, but I will if I have to :).
Perl absolutely ruined me. Right after learning Perl for some text processing I was doing, I also made a career change into a technology adviser and analyst for a large R&D firm. 6 months into that new job I happened to have a need to process some data. They had Java and Perl on the machine as a leftover from the previous owner of the box (C++ environments were still fairly expensive back then, security wouldn't let me install Linux or Cygwin, and anything else wouldn't pass muster).
I didn't want to fool around with Java's file I/O mess, so I just picked Perl. I got shit done, a lot of shit. I got 5 awards from the firm in 3 years and a nomination for a lifetime achievement award and all I was doing was hacking up some one-off Perl scripts to crunch some data! I was much more familiar with C++ and Java, and I simply hadn't thought about how much I was accomplishing and with such little effort.
Over the next few years I quietly left behind all of the other languages and got into a serious Perl groove. Solving issues in a few days that were stumping teams of a dozen for months. I am not a particularly talented programmer. I built little web apps to scratch department itches that came up during meetings ("why isn't there an acronym database?", "I wish we had a meta-search engine that search Yahoo, Altavista and Lycos at the same time!", "I wish I could scan these documents quickly for all of the chemicals in our chemical warehouse", etc. etc.) Then I started solving harder problems. My Perl prototype code was often passed off to a team where it was rewritten in a "real" language, but since I was the one who solved the tricky problem, it was my solution that ended up being rewritten in C++ or Java.
Then came a time I needed to write something in Java based on a deliverable requirement. You know what? I couldn't do it. I don't mean technically, I mean mentally. everything seemed like a huge pain in the ass. The delta from thought to code seemed so drawn out that by the time I had put my thought down into code I had often forgotten what the hell I was coding in the first place. Simple exercises involving half a dozen lines of code and minimal thought turned into half hour long dives into the standard library docs...yes I said it, the Perl solution might be longer than the Java one, but the time to just code it out was an order of magnitude faster. I ended up in groove with Perl I simply couldn't achieve even after years of working in other languages. I finished the Java project and swore off "real" languages for good after that. I had simply been broken by Perl and ruined for good.
Perl just simply came together like how my brain worked. I could dump out ideas and it just worked...and I got shit done. With a little careful planning I could even tackle larger projects, a couple that approached a 100k lines of Perl (and had the annoying habit of running faster than the later Java rewrites, which eventually had to be rewritten in hand optimized multi-threaded C++ with in-line ASM to beat the original 5 year old Perl in performance)
It was the difference between typing text with a keyboard and handwriting all caps, backwards in a mirror, while translating each word from English to Russian via a English-French dictionary then French-Russian dictionary in the dark by candlelight.
All that being said the long Perl 5->6 winter had me reaching outside of Perl for a while into Python and it was "ok". I liked how my code was automatically readable and simple. The standard libraries are badass. But it just didn't have the there there that Perl has. The automagic flow from synapse to working code. I'm happy to see the community starting to pick back up but sadly I'm hopelessly locked in 2001 Perl and many of the idioms from that time. It would simply take too much of a time investment to get entirely up-to-speed with where Perl is today. I'd probably be better spending the time on something more marketable with better and more modern library support.
Here's the real kicker, I ended up using Perl to get really good at my non-programming (but still technical) job that it would probably take me years of dedicated effort to get back up to speed with where modern development is at all. I'm old enough now that I'd simply be much more comfortable managing modern developers than being one.
So yeah, that's how Perl might ruin you.