Hmm. What I would suggest depends on your experience in other programming languages.
I find a nice way to learn a language is to start of with something simple, and then more and more featues until it is quite involved.
So how about writing a quiz, and adding additional, increasingly complicated, features over time?
Write a quiz that loads the questions and answers from a data file. The program asks the user each question and checks the answer for correctness. At the end of the questions the program displays the results "You scored 5/10"
Modify your program so that the questions and answers are stored in XML. Use a module to parse the XML. With the XML, allow multiple choice questions. Some multi choice questions may have more than one answer, so cater for that in your program and XML. (module XML::Simple)
add a timer, so that the quiz must be completed in at most X seconds, or each question must be answered in at most Y seconds
Prompt the user for their username, then add a feature that saves the quiz results into a database. Develop reports, so the user can find out their average score, number of tests taken, standard deviation, etc (module: DBI).
Add graphing, showing a say user's results or a average time taken to complete the quiz, over time (module: GD).
Provide a CGI interface for your script, so you can put it onto the world wide web (module: CGI)
Write a GUI for your quiz (module: Tk)
Turn your progam into a client/server app, where the server sends the question, the client sends the answer (module: IO::Socket)
Make your questions dynamic or random by querying the world wide web for the question/answer combinations, say from www.quiz.com or www.dictionary.com (module: LWP)
If you manage to implement these features (or even some), you will be amazed at the power of knowledge you have gained.
I hope this helps
--
bm
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|