Re: Exercises on PERL
by GrandFather (Saint) on Sep 11, 2009 at 09:48 UTC
|
A really good form of exercise for learning Perl is to attempt to answer Seekers of Perl Wisdom questions. You don't need to post your answer, although some times you may wish to raise a question of your own when your solution doesn't behave as expected.
The nice thing about SoPW questions is that many of them are in the context of real problems and that you very often get a wide range of solutions with discussion of their merits. The other thing is that there is a huge number of them - sufficient that with a little searching you are sure to find questions that are of interest to you and match your current experience level.
True laziness is hard work
| [reply] [Watch: Dir/Any] |
Re: Exercises on PERL
by moritz (Cardinal) on Sep 11, 2009 at 09:13 UTC
|
I don't know of any good books with many exercises, but I'd recommend writing programs "for real".
You learn a lot from scratching your own itches, looking up needed functions or modules as necessary.
You can also start answering beginners questions here at perlmonks, I was surprised how much I learned in that progress.
Perl 6 - links to (nearly) everything that is Perl 6.
| [reply] [Watch: Dir/Any] |
Re: Exercises on PERL
by cdarke (Prior) on Sep 11, 2009 at 09:11 UTC
|
Welcome to Perl, but you should quickly be told that using PERL is frowned upon. The language is "Perl" and the interpreter is "perl". Never PERL.
For your purposes I recommend The Perl Cookbook, also from O'Reilly. However, nothing beats writing an application for your own use. Perl is huge and can be used for almost anything. You probably don't need to know all of Perl, concentrate on the areas that will help you most with your job. | [reply] [Watch: Dir/Any] |
Re: Exercises on PERL
by FunkyMonk (Chancellor) on Sep 11, 2009 at 10:24 UTC
|
Many years ago, there was a Perl quiz of the week (actually it was two quizzes: regular and expert). The regular quiz was aimed at coders who had finished reading Learning Perl.
There are archives of the regular quiz problems & solutions and the same again for the expert problems & solutions
There was another mailing list to discuss each of the problems and its archive can be found here.
I hesitate to add this but Ruby also had a (much longer running) quiz of the week. You can find their list of problems (some are the same as the Perl questions) here. | [reply] [Watch: Dir/Any] |
Re: Exercises on PERL
by almut (Canon) on Sep 11, 2009 at 09:30 UTC
|
You might find the course notes on perltraining.com.au useful (they have exercises — though I don't think there are immediate solutions along with the exercises... just hints).
| [reply] [Watch: Dir/Any] |
Re: Exercises on PERL
by 1Nf3 (Pilgrim) on Sep 11, 2009 at 09:29 UTC
|
The logical next step would be "Intermediate Perl". It's a great book, and it picks up right where "Learning Perl" has left.
Regards, Luke
| [reply] [Watch: Dir/Any] |
Re: Exercises on PERL
by ELISHEVA (Prior) on Sep 11, 2009 at 15:30 UTC
|
This thread has given you two types of advice: sources to read and learn more ("Intermediate Perl", "Advanced Programing with Perl") and encouragement to engage in a real problem.
It is important to realize that these two kinds of advice are not alternatives, but rather two different approaches that go hand in hand. Reading the recommended books will challenge you to do things you might not have thought of doing before. This is also an important time to start developing your personal programming style. These books will help you think through the choices.
On the other hand, all formal programming books, no matter how challenging, present a sanitized view of the world of programming. The goal of an exercise is to illustrate a concept, and it can't do that well if there is a lot of noise due to "real life". But if you want to learn programming to "do" something (like earn a living or save the world), then one will eventually have to deal with the messy world of real life programming problems. There are some things you can only learn to handle by experience: how to cope with fuzzy problem definitions, incomplete APIs, bugs in 3rd party modules, poorly written documentation, among others.
It is so easy to think that one is not quite ready for "real problems". In reality, you can never know enough to be ready, so it is better to just jump in. Doing "real problems" together with a book can help you put the book in perspective and understand what is real and what is idealized. When you start applying book knowledge to your own "real life" problems, you will find things hard going from time to time, or even all of the time (at first), but difficulties aren't because you don't know enough. Rather they are because you still don't know how to use what you already know.
Finally, to master anything well one must be passionate about it. Working on your own problems (or developing something cool for someone you care about) is a great way to put your heart into programming. The more you want to make the program work the more you will push yourself. We have monks here that have clung for years to things that were very hard for them simply because the end goal, be it a website, game, or CD organizer, meant so much to them.
Best of luck on your programming journey, beth
| [reply] [Watch: Dir/Any] |
Re: Exercises on PERL
by Bloodnok (Vicar) on Sep 11, 2009 at 10:25 UTC
|
| [reply] [Watch: Dir/Any] |
Re: Exercises on PERL
by bv (Friar) on Sep 11, 2009 at 15:51 UTC
|
If you are having trouble finding real coding problems, this site seems to have a good selection of real problems to work in the language of your choice: Code Kata.
Happy Perling!
print pack("A25",pack("V*",map{1919242272+$_}(34481450,-49737472,6228,0,-285028276,6979,-1380265972)))
| [reply] [Watch: Dir/Any] [d/l] |
Re: Exercises on PERL
by grizzley (Chaplain) on Sep 11, 2009 at 09:40 UTC
|
I agree with others - real coding is really good method. I would add http://www.codegolf.com suggestion, there is nothing more motivating to dig through documentation, as little competition :) | [reply] [Watch: Dir/Any] |
Re: Exercises on PERL
by merlyn (Sage) on Sep 11, 2009 at 23:25 UTC
|
There's also brian d foy's Learning Perl Student Workbook, which has additional exercises for each of the Llama book's chapters.
-- Randal L. Schwartz, Perl hacker
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
| [reply] [Watch: Dir/Any] |
Re: Exercises on PERL
by leocharre (Priest) on Sep 11, 2009 at 13:30 UTC
|
The answer is no.
The time is now.
The place is here.
It is now time to code.
Do it.
If you're on a posix system, create a script to automate something you do regularly (maybe on a second user account, and not as root)
If you have a hosting account, write a cgi that shows random pictures or choosed from a random website to jump to.
No more quizes. Code.
You will fail, you will go back to the book you are now very much familiar with, PERL, and you will debug.. and pull out your hair, and fail, and read, and fail, and ...
Then you will succeed, and you will get a gold star on your forehead and fairy dust.
| [reply] [Watch: Dir/Any] |
Re: Exercises on PERL
by biohisham (Priest) on Sep 11, 2009 at 23:57 UTC
|
| [reply] [Watch: Dir/Any] [d/l] |
Re: Exercises on PERL
by planetscape (Chancellor) on Sep 12, 2009 at 03:10 UTC
|
| [reply] [Watch: Dir/Any] |