home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2002 February
/
PCWorld_2002-02_cd.bin
/
Software
/
TemaCD
/
proxomitron
/
prx4fcz.exe
/
Help
/
Replace.bat
< prev
next >
Wrap
DOS Batch File
|
2001-08-18
|
691b
|
39 lines
@rem = '--*-Perl-*--';
@rem = '
@echo off
perl.exe -w Replace.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
@rem ';
##
## Very simple PERL script to do do search & replace in all HTML documents
##
my($name);
while($name=<*.html>){
HTML_Replace($name);
}
sub HTML_Replace
{
my($name)=$_[0];
my($txt)="";
my($l);
open(FIN,"<$name") || die("File Not Found\n");
while(<FIN>){ $txt .= $_; };
close(FIN);
if($txt =~ s|Send Me Your Filters\.html|Send In Your Filters.html|g){
open(FOUT,">$name") || die("Can't make new file\n");
print FOUT $txt;
close(FOUT);
print "$name\n";
}
}
__END__
:endofperl