
#!/usr/local/bin/perl
{
        if (/^.TH/) { s/\.TH //; chop;
                        print("<HEAD><TITLE>$_<\/TITLE><\/HEAD><BODY>\n");
                        next;
        }
        if (/^\.I/) { s/\.I /<i>/; s/\n/<\/i>\n/; }
        if (/^\.B/) { s/\.B /<b>/; s/\n/<\/b>\n/; }
        if (/^\.SH/) { s/\.SH /<h1>/; s/\n/<\/h1>\n/; }
        s/\\-/-/g;
        s/^.PP/<p>/;
        s/^.P/<dl>/;
        s/^.HP.*/<dt>/;
        s/^.nf/<pre>/;
        s/^.fi/<\/pre>/;
        print;
}

