<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/env perl
use strict;
$^W=1;

@ARGV == 2 or die "!!! Syntax: &lt;input file&gt; &lt;output file&gt;\n";

my $infile = $ARGV[0];
my $outfile = $ARGV[1];

open(IN, '&lt;', $infile) or die "!!! Error: Cannot open `$infile'!\n";
open(OUT, '&gt;', $outfile) or die "!!! Error: Cannot write `$outfile'!\n";
while (&lt;IN&gt;) {
    s/^(=head[1] [A-Z])(.*)/$1\L$2\E/;
    s/(L&lt;"[A-Z])([^"]+)"&gt;/$1\L$2\E"&gt;/g;
    print OUT;
}
close(IN);
close(OUT);

__END__
</pre></body></html>