ЭЛЕКТРОННАЯ БИБЛИОТЕКА КОАПП
Сборники Художественной, Технической, Справочной, Английской, Нормативной, Исторической, и др. литературы.



12.6 Exercises

Answers are in Appendix A, Exercise Answers.

  1. Write a program that changes the directory to a location specified as input, and then lists the names of the files found there in alphabetical order. (Don't show a list if the directory change doesn't succeed: merely warn the user.)

  2. Modify the program to include all files, not just the ones that don't begin with dot. Try to do so with both a glob and a directory handle.


Previous: 12.5 Reading a Directory HandleLearning Perl on Win32 SystemsNext: 13. File and Directory Manipulation
12.5 Reading a Directory HandleBook Index13. File and Directory Manipulation