use strict;
use File::Find;
die "usage $0
" unless (@ARGV == 1 && -d $ARGV[0]);
find (
sub {
return unless -f $_;
open (FILE, "< $_") or warn "cannot read $_\n" and return;
my @lines = grep {!(/inserted banner/i .. /end of inserted banner/i)} ;
close (FILE);
open (FILE, "> $_") or warn "cannot write $_\n" and return;
print FILE @lines;
close (FILE);
},
$ARGV[0]
);