http://www.perlmonks.org?node_id=552099


in reply to Real Life Perl Exercises

It seems to me that programming languages work much like spoken languages. No matter how much you learn the rules, the vocabulary, grammar, syntax, etc., you have to actually *use* the language before it really sinks in. Others have suggested that you find some chores you do, and write Perl programs to do them for you. I agree, this is a great way to learn. It forces you to really look hard at what the syntax is, to learn (for example) the number and order of parameters to functions, how things *really* work (as opposed to how you thought they did just by reading about it), teaches you through repetition and close examination. It also leaves you with some useful programs and scripts, if you've chosen well.

Another thing that I've found helpful is to look at code that other Perl programmers have written - ideally programmers who are good at what they do. Try to figure out why it works, why the programmer chose to do it this way instead of another. For one thing, you can learn some very useful (or just amazingly clever) Perl idioms. For another, after you spend hours puzzling over some strange-looking code, the effort often results in knowledge beyond just that bit of code. And of course if you get stuck, there is always PM to help point you in the right direction.