4.11. Exercises

  1. Use exercises/easyconnect.pl to connect to your Acme Widget Co. database. You will need to edit some of the lines at the top.

  2. Use a while loop to output data a row at a time

  3. Check all your statements for indications of failure, and output messages to the user using warn() if any of the steps fail.

4.11.1. Advanced exercises

  1. If you wish, you can use a hash reference instead of an array

  2. Change the SQL in easyconnect.pl to use a non-SELECT statement, and use the do method instead of the prepare and execute methods. Don't forget to check the return value!