2 ## Copyright (C) 2023 by jrmu <jrmu@ircnow.org>
4 ## Permission is granted to use, copy, modify, and/or distribute
5 ## this work for any purpose with or without fee. This work is
6 ## offered as-is, with absolutely no warranty whatsoever. The
7 ## author is not responsible for any damages that result from
10 # Extra credit exercise: write a program to add a copyright line to
11 # all of your exercise answers so far, by placing a line like:
13 # ## Copyright (C) 2021 by Your Name <yourname@ircnow.org>
15 # ## Permission is granted to use, copy, modify, and/or distribute
16 # ## this work for any purpose with or without fee. This work is
17 # ## offered as-is, with absolutely no warranty whatsoever. The
18 # ## author is not responsible for any damages that result from
21 # in the file immediately after the "shebang" line. You should edit
22 # the files "in place,", keeping a backup. Presume that the program
23 # will be invokved with the filenames to edit already on the
26 # Extra extra credit exercise: modify the previous program so that
27 # it doesn't edit the files that already contain the copyright
28 # line. As a hint on that, you might need to know that the name of
29 # the file being read by the diamond operator is in $ARGV.
39 my $copyright = <<'END_COPYRIGHT';
40 ## Copyright (C) 2023 by jrmu <jrmu@ircnow.org>
42 ## Permission is granted to use, copy, modify, and/or distribute
43 ## this work for any purpose with or without fee. This work is
44 ## offered as-is, with absolutely no warranty whatsoever. The
45 ## author is not responsible for any damages that result from
49 s@\A(#!.*\n)@$1$copyright@m;