#!/usr/bin/env perl

use strict;
use warnings;

open HTML, "< index.html";

print "Content-Type: text/plain; charset=UTF-8\n";

print '"Chinese","Pinyin","English"';
while (<HTML>) {
    next unless /<td>/;
    chomp;
    s/<\/td><td>/","/g;
    s/^\s*<tr><td>/"/;
    s/<\/td><\/tr>\s*$/"/;
    print "$_\n";
}
