来原学习perl的时候老是出现下面的问题,只知道是语言环境变量的问题。
[root@linuxas4-pc ~]# ./test.pl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "us",
LC_ALL = "us",
LANG = "us"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
42
asdfasdf
今天到网上搜了一下,发现通过如下就可以,试一下果然OK.
[root@linuxas4-pc ~]# more /etc/environment
LC_ALL="zh_CN.UTF-8"
LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN.UTF-8:zh:en_US:en"
重启一下机器就可以了。
阅读(1262) | 评论(0) | 转发(0) |