#!/var/www/cs/bin/perl
#
# hide all the <div ... modified> tags
#
use strict;
use warnings;
use File::Find;
@ARGV = (".") unless @ARGV;     # start in this directory

## print all the file names
#find sub { print $File::Find::name . "\n" unless -d  }, @ARGV;

## modify all the files in place
find sub { 
 return if -d;
 return if     $File::Find::name =~ m{\.svn};    # don't go into .svn directories
 #return unless $File::Find::name =~ m{\.html$};  # only process .html files
 my $file = $_;
 print "  " . $File::Find::name . "\n";  # see what it's doing.
 # my $regex = 's{(^<div id="modified">.*</div>)}{%# $1 }';
 my $regex = 's{\$page_name}{\$page_name}';
 `/var/www/cs/bin/perl -pi -e '$regex' $file`;
}, @ARGV;

print "Done.\n";


# safer is  `/var/www/cs/bin/perl -pi.orig -e '$regex' $file`;

