b2j
上传用户:minyiyu
上传日期:2018-12-24
资源大小:864k
文件大小:0k
- #!/usr/local/bin/perl
- $tmpjisfile = "/tmp/jisgate$$.jis";
- $tmpeucfile = "/tmp/jisgate$$";
- $jis='/usr/local/bin/jis';
- $e2b='/usr/local/bin/sinocode';
- open(SINO,"| $e2b -big - -jis $tmpeucfile") || die "can't open pipe to $e2b $!n";
- while (<>){
- print SINO $_;
- }
- close(SINO);
- chdir('/tmp');
- system("$jis -j $tmpeucfile $tmpjisfile");
- open(TMP,$tmpjisfile) || die "can't read $tmpjisfile $!n";
- print <TMP>;
- close(TMP);
- unlink($tmpjisfile);
- unlink($tmpeucfile);