I have started playing around with Perl 5 lately, and it seems very interesting. I would like to spend some time learning it more in depth when I can.

My question, since Perl 6 is slowly taking place (I believe...) and is said to break backward compatibility, is this: am I better learning Perl 5 and then Perl 6, or is learning Perl 6 directly a better time investment according to you?

If the changes from Perl 5 to 6 are making it hard to understand Perl 5, I should certainly start with Perl 5 to be able to read "old" scripts, then check Perl 6. There is also the "Perl 6 is not yet completely released" problem. I know there's an early adopter implementation for Perl 6, but if Perl 6 isn't officially released before some more years, I'll stick to 5 for now.

I would certainly like some insight on this. Feel free to discuss related stuff. My interest in scripting languages is fairly new.


  • 3
    Perl 6 has not yet been released. If you need this for "real work", then concentrate on Perl 5. – user1249 Dec 17 '10 at 16:17
  • Going with the votes, after all this time, but many interesting answers IMO. I like that you brought the idea that Perl 5 and 6 should considered different languages. Thanks! – Joanis Dec 14 '11 at 6:59

Perl 5 and Perl 6 are different languages, not two versions of the same. Perl 6 is heavily inspired by Perl 5, but not exclusively. I would suggest focusing on Perl 5 for now. If you watch the community (I'd suggest the Planet Perl Iron Man aggregator, you'll also see posts and content from the Perl 6 community and can keep an eye on it. Also, many features of Perl 6 are slowly coming back to Perl 5.

Also: Despite some people's hate for Perl, it's 2010 now, not 1995 anymore, and Perl has immensely moved forward, and continues to do so.


Yes to Perl 5

Sure, go learn Ruby and even Python, but Perl is different. And intelligent beyond reason. Perl is one of those languages that you can learn things you never wanted and be glad you did and yet will have to re-read the Camel book every couple of years just so you don't fully mentally purge your perlisms.

Perl is of alien syntax, even to the most seasoned professionals. Personally, I believe you will expand your horizons with Perl.

Perl 5 is what I consider to be Perl 1.5. Perl 6 is what I consider Perl 2.0, maybe should even be named something different completely, so yes both 5 and 6 are worth learning in their own right and for their own merits. Disclaimer=I'm still struggling with Perl6 myself...


In answer to the question in the headline: yes!

As you pointed out, focusing on Perl 5 is by no means a waste of your time, since the vast majority of examples, tutorials, and applications in Perl will be from the 5 branch.

This said, you should certainly keep up with the Perl 6 project and its progress. I took some time to learn Python 3 before it's first release, just so I understood what changes were being made and why. This helped me when migrating from the 2.x codebase to 3.x.

I wouldn't invest too much time learning the ins/outs of Perl 6; a deep understanding of Perl 5 will serve you better for the time being. But once it's been released (whenever that bloody is), a basic understanding of Perl 6 will help you keep moving forward.


Perl 5 is the stable line, which will probably develop on a different line than Perl 6. Perl 6 is probably going to have to figure out a new name than Perl.

Perl 6 is, frankly, awesome. But it's not stable enough yet for enterprise use in production (at least, from what I understand). Of course, stable in the enterprise means Perl 5.8 in my experience...


Don't learn Perl 6.

CPAN doesn't even support it yet. (I suspect it will ship with a module that allows Duke Nukem Forever to be played entirely through the use of regexes...)

  • Hehe... vapourware ftw! – Simon Whitaker Dec 17 '10 at 14:16
  • 1
    Perl 6 doesn't use regexes, it uses rules (and they're awesome!): en.wikipedia.org/wiki/Perl_6_rules – Gaurav Apr 28 '11 at 18:13
  • New Joke needed. – Sean McMillan Oct 7 '11 at 15:01
  • @SeanMcMillan A joke I made last year is old? :P (I can't help it if Duke Nukem Forever has been released in that time...) – Kevin Cantu Oct 10 '11 at 21:10

Perl 5 is stable now and I think one must learn the most recent stable version first. Upgrading to another version would then become easier.


Best advice: no, no, no! Perl 5 is best right now since Perl 6 is not fully developed.


If you are interested in scripting style languages, I would suggest learning Python and/or Ruby instead. I first learned Perl several years ago. The main thing I learned from it is regular expressions. Most other languages that have built in regex are derivatives of the Perl implementation. But beyond that, I didn't use Perl for all that much. The main criticism of Perl is that some consider it a 'write-only' language. It is very hard to come back to old code and easily understand what was done.

It's my perception that more progress is being made with Python, and Ruby (like Rails), than there is with Perl. It's always good to stretch your brain an learn a new language, but Perl probably wouldn't be a top suggestion.

  • 1
    Actually javascript is the king of script. – Daniel Little Dec 17 '10 at 4:40
  • Thanks for the input. Seemingly, Perl would be a not so good choice nowadays. Just curious though... Is it as easy to write awesomely concise one-liners at shell prompt with Python, Ruby and Javascript? – Joanis Dec 17 '10 at 4:46
  • 3
    Perl has changed a lot since the old days. And there are many people still opting for it, and learning it. Things like testing, documentation, interoperability, backcompatibility, stability and a focus on a good toolchain are more modern attributes of Perl. – phaylon Dec 17 '10 at 14:07
  • In my experience, learning Perl helps with learning Ruby, since many concepts are shared. – justkt Dec 17 '10 at 14:45
  • Perl regexps CAN parse HTML (or something) – user1249 Dec 17 '10 at 16:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.