基于Windows 7上的Perl

Meg*_*ind 6 windows perl locale padre

我在Windows 7上安装了Padre perl,perl IDE.每次运行程序时,我都会收到错误消息,

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

LC_ALL = (unset),

LANG = (unset)

are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").
Run Code Online (Sandbox Code Playgroud)

我得到输出,但此错误消息位于每个输出的顶部.我厌倦了为这个问题寻找解决方案,有人可以告诉我如何解决这个问题吗?

cra*_*535 2

您需要将LC_ALLLANG环境变量设置为C

C:\>set LC_ALL=C
C:\>set LANG=C
C:\>perl x.pl 
Run Code Online (Sandbox Code Playgroud)

如果您想让此设置永久生效,或者通过 IDE 进行工作,请转到“控制面板”->“系统和安全”->“系统”->“高级系统设置”,然后在“高级”选项卡下单击“环境变量”。然后,将 LC_ALL 和 LANG 添加到列表中。如果更改这些变量,您可能需要重新启动 IDE。