FOR 当前离线
中尉
open var,"<a.txt"; foreach (<var>) { print substr($_,1); }复制代码
sxw (^_^)当前离线
少尉
use Encode; open var,"<a.txt"; foreach (<var>) { $_=encode("utf-8",$_); print substr(decode("gb2312",$_),1); }复制代码
TOP
523066680 (消遣区)当前离线
版主
use Encode; open READ,"<:encoding(utf8)", "a.txt"; #按utf8编码解读,变成unicode通用码 foreach (<READ>) { print encode('cp936', $_); #将通用码转为CP936以对应终端编码 }复制代码