4
# This program adds some HTML entities to the text files. This will help prevent
5
# missing characters when including text documents in HTML.
7
# Written by: Alex Burger
8
# Date: December 29th, 2005
24
README.Panasonic_AM3X.txt
32
perl/AnyData_SNMP/README
33
perl/default_store/README
36
perl/TrapReceiver/README
40
foreach my $file (@files) {
41
open (FILEIN, $file) || die "Could not open file \'$file\' for reading. $!";
42
open (FILEOUT, ">$file.new") || die "Could not open file \'$file.new\' for writing. $!";
44
while ($line = <FILEIN>) {
45
$line =~ s/&(?!lt|gt|quot|amp)/\&/g;
48
$line =~ s/\"/\"/g;
49
print FILEOUT "$line";
53
if (! (move ("$file", "$file.old"))) {
54
die "Could not move $file to $file.old\n";
56
if (! (move ("$file.new", "$file"))) {
57
die "Could not move $file.new to $file\n";