Полезная информация

Learning Perl on Win32 Systems

Learning Perl on Win32 SystemsSearch this book
Previous: 13.5 Modifying TimestampsChapter 13
File and Directory Manipulation
Next: 14. Process Management
 

13.6 Exercises

See Appendix A, Exercise Answers for answers.

  1. Write a program that works like del, deleting the files given as command-line arguments when the program is invoked. (You don't need to handle any options of del.)

    Be careful to test this program in a mostly empty directory so that you don't accidentally delete useful stuff! Remember that the command-line arguments are available in the @ARGV array when the program starts.

  2. Write a program that works like rename, renaming the first command-line argument to the second command-line argument. (You don't need to handle any options of rename, or more than two arguments.) You may wish to consider how to handle the rename when the destination is a directory.


Previous: 13.5 Modifying TimestampsLearning Perl on Win32 SystemsNext: 14. Process Management
13.5 Modifying TimestampsBook Index14. Process Management