blah blah
#### 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] ); #### perl -MFile::Find -pi.bak -e "BEGIN {find sub {-f && push @ARGV, $File::Find::name}, \".\"} if (/inserted banner/i) {while (<>) {s/.*// and last if /end of inserted banner/i;}}"