# Inserts spaces between " and /> and before / in
and
to comply with XHTML
# Appendix C
if ($#ARGV > 0) {
print STDERR "Too many arguments!\n";
exit;
}
my @file; # file content
my $totalno = 0;
my $filename = @ARGV[0];
if ($filename) {
print STDOUT "Putting spaces before slashes...\n ";
open( INFILE, $filename ) || die "Could not open source file for reading.";
while () {
s/\"\/>/\" \/>/g;
s/
/
/g;
s/
/
/g;
$totalno++;
push @file, $_ ;
}
close (INFILE) || die "Can't close source file after reading.";
open (OUTFILE, ">$filename") || die "Could not open source file for writing.";
foreach $line (@file) {
print OUTFILE $line;
}
close (OUTFILE) || die "Can't close source file after writing.";
# print STDOUT $totalno, ' ' ;
}