#!/usr/bin/perl -w use strict; $^I = ".bak"; my %do_these; foreach (@ARGV) { $do_these{$_} = 1; } while (<>) { if (/^## Copyright/) { delete $do_these{$ARGV}; } } @ARGV = sort keys %do_these; while (<>) { if (/^#!/) { $_ .= "## Copyright (C) 2008 by C'est mois\n"; } print; }
In reply to Prorgam obliterates contents of files by bluethundr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |