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.

This question appears to be off-topic. The users who voted to close gave this specific reason:

"Questions seeking career or education advice are off topic on Programmers. They are only meaningful to the asker and do not generate lasting value for the broader programming community. Furthermore, in most cases, any answer is going to be a subjective opinion that may not take into account all the nuances of a (your) particular circumstance." – Ixrec, durron597, Snowman, MichaelT, jwenting

Perl 6 has not yet been released. If you need this for "real work", then concentrate on Perl 5.
–
user1249Dec 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!
–
M. JoanisDec 14 '11 at 6:59

8 Answers
8

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.

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...

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.

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.

Actually javascript is the king of script.
–
Daniel LittleDec 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?
–
M. JoanisDec 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.
–
phaylonDec 17 '10 at 14:07

In my experience, learning Perl helps with learning Ruby, since many concepts are shared.
–
justktDec 17 '10 at 14:45