views:

252

answers:

6

Is there a Perl equivalent to the ruby-koans project?

When I was starting to learn ruby a few months ago I stumbled across ruby-koans and it was a huge help for learning the basics of the language.

I now need to poke at some Perl code, and while I've hacked together a few Perl scripts in the past I've never really learned the language, and every time I have to refer back to older scripts I wrote for even simple things. I have a feeling that something like koans would make it much easier for me to learn and retain knowledge of Perl.

Does anything like that exist?

+4  A: 

Perl happens to come with great documentation that is more than just a list of API functions, parameters and return types.

Those tutorials include a lot of code samples that show what to do and what not to do.

In my experience, one needs to read ALL of the bundled documentation at least once before seeking other sources of wisdom.

Sinan Ünür
Documentation is nice, but I learn a lot more by using it, and koans provided an excellent mechanism for learning the various pieces of the language. I want something that will stick with me more than my previous dabblings in perl have (and those previous times involved just using the documentation to figure out my specific problem).
Herms
I'm not saying the tutorials are bad. But they're a much more passive way of learning than koans. It's certainly better than nothing, but koans was *by far* the most frictionless and effective mechanism I've seen for learning a new language. I have a perl book, and I can go through those tutorials, but I'm convinced that the format used by the ruby koans project was *easily* the optimal format for learning a new language (at least for the way I tend to learn). That's why I'm looking for a perl version.
Herms
@Herms: Unfortunately, my answer to your question is: I do not know. On the other hand, my opinion as to the optimal way to learn a programming language seems to differ considerably from yours and that advocated by the `ruby-koans` project. Apologies ... I can't really help other than to reiterate that long term learning only occurs with repeated use.
Sinan Ünür
I agree about the repeated use, and that's part of what I like about koans. You're immediately using it, but it also doesn't immediately give you the answer. You have to think a bit more than you would when simply following a tutorial and it's a more active experience, both of which help the learning process (for me anyway). I rarely learn by reading; I always learn by doing. And sure, I could learn it without koans (and I'm sure I'll use those links you provided either way), but I'd probably learn much faster with somethign like koans.
Herms
+4  A: 

I don't know of anything exactly like the koans.

The standard docs have lots of example code--especially the tutorial and cookbook style articles.

Some other resources:

daotoad
+8  A: 

Two possible options in absence of 100% identical alternative:

  1. A mid-point between perldoc and ruby koans is O'Reilly's Perl Cookbook. It offers working "how to solve this particular task" examples.

  2. As a DIY perl koan, how about perusing "perl" tag on StackOverflow and trying to answer the questions (without peeking at answers)? Not 100% the same but a great way to learn by doing.

DVK
2 is an interesting idea, though it would probably be hard to narrow down which perl questions are simple enough to be feasible to use as a learning example.
Herms
Didn't Luke start his training by rying to lift an X-Wing? :)
DVK
Pretty sure that happened after he had been training for a while. :P
Herms
Hmm... fine, I'm surrendering my Geek badge :(
DVK
+5  A: 

One great resource that I use to quickly move between languages is RosettaCode. Its not tutorials, but a wide assortment of simple programming tasks done in many languages. I find that if I know one or two languages on the page, using them, I can usually figure out how an unfamiliar language on the page works. The Ruby, Python, and Perl sections are even close alphabetically, making jumping back and forth easy.

Eric Strom
ooh, interesting.
Herms
+2  A: 

Try reading "Learning Perl" (not earlier than 4th edition) or "Beginning Perl". Both has exercises.

Alexandr Ciornii
+1  A: 

Herms is right. I've programmed perl for 17 years (yes, perl v4.0 pl 7 was a nice time to start), and was looking for perl-koans after having just done ruby-koans (used ruby for 4 years and learned a lot from the koans Thanks Edgecase!) and python-koans.

Wayne Walker