[10] Extra credit exercise: Write a program to add a copyright line to all of your exercise answers so far, by placing a line such as: ## Copyright (C) 20XX by Yours Truly
Place it in the file immediately after the "shebang" line. You should edit the files "in place" and keep a backup. Presume that the program will be invoked with the filenames to edit on the command line.
[15] Extra extra credit exercise: Modify the previous program so it doesn't edit the files that contain the copyright line. Hint: You might need to know that the name of the file being read by the diamond operator is in $ARGV.
没有评论:
发表评论