#!/usr/bin/perl open (PHO, "big5pho.txt"); open (PY, "py"); while() { chomp; # ¥h±¼´«¦æ s/£¼/_:/g; s/£½/':/g; s/£¾/^:/g; s/£¿/`:/g; s/£»/!:/g; ($a, $b) = split(); $pho{$a} = $b; } while() { chomp; # ¥h±¼´«¦æ ($a, $b) = split(); $py{$a} = $b; } while(<>) { chomp; @s = m/../g; foreach (@s) { @p = split(':', $pho{$_}); $length = $#p; if ( $length > 0) { print '!'; } foreach (@p) { @tmp = m/([_'^`])/g; s/[_'^`]//g; print $py{$_}, $tmp[0]; } if ( $length > 0) { print '!'; } print " "; } print "\n"; }