#!/usr/bin/perl # Created On : Mon Apr 14 05:23:07 2008 # Last Modified On: Tue May 13 03:09:03 2008 # Update Count : 292 =encoding utf8 =head1 NAME zhuyin2hanyu -- Zhuyinfuhao to Hanyu Pinyin converter =head1 USAGE EXAMPLES $ perl -ln011we 'if(/緘.*口/){print;exit}' chewing/dict.dat| tee /dev/stderr|zhuyin2hanyu 緘口 0 ㄐㄧㄢ ㄎㄡˇ 緘口 0 jian1 kou3 =head1 DESCRIPTION Attempt to convert Taiwan's Chinese Zhuyinfuhao (注音符號, Bopompofo) phonetics to Hanyu Pinyin (漢語拼音) with the least amount of lines of code. =head1 COPYRIGHT http://www.fsf.org/copyleft/gpl.html =head1 AUTHOR Dan Jacobson 積丹尼 http://jidanni.org/ =cut use strict; use warnings FATAL => 'all'; use utf8; binmode STDIN, ":utf8"; binmode STDOUT, ":utf8"; while (<>) { s/\Bㄨㄥ/ong/g; s/ㄩㄥ/iong/g; s/(?