#!/usr/local/bin/perl # PERL program that searches and replaces html backgrounds # Patrick Darden Oct 17 1995 for Dr. Hilton # The Blake Project # while($filename=shift(@ARGV)) { open(FILE, "$filename") || die "No such file.\n"; @file=; close FILE; if ($filename !~ m/.*all.html.*/) { $newfilename="$filename" . ".old"; system("mv $filename $newfilename"); # print "@file \n\n"; open(NewFile, ">$filename"); foreach $line (@file) { $line=~s#(\d\d?)all.html#$1frall.html#; # print NewFile "$line"; print NewFile "$line"; } close NewFile } }