start page | rating of books | rating of authors | reviews | copyrights

Learning Perl on Win32 Systems

Learning Perl on Win32 SystemsSearch this book
Previous: 9.6 &&, ||, and ?: as Control Structures Chapter 9
Miscellaneous Control Structures
Next: 10. Filehandles and File Tests
 

9.7 Exercises

See Appendix A, Exercise Answers for the answers.

  1. Extend the problem from the last chapter to repeat the operation until the word end is entered for one of the values. (Hint: use an infinite loop, and then do a last if either value is end .)

  2. Rewrite the exercise from Chapter 4, Control Structures , summing numbers up to 999, using a loop that exits from the middle. (Hint: use a naked block with a redo at the end to get an infinite loop, and a last in the middle based on a condition.)


Previous: 9.6 &&, ||, and ?: as Control Structures Learning Perl on Win32 Systems Next: 10. Filehandles and File Tests
9.6 &&, ||, and ?: as Control Structures Book Index 10. Filehandles and File Tests