简体   繁体   English

无法在Windows 8.1上运行任何Perl脚本

[英]Cannot run any Perl scripts on Windows 8.1

I installed Active Perl 5.20 and also Strawberry Perl 5.20 after uninstalling Active Perl. 卸载Active Perl之后,我安装了Active Perl 5.20,还安装了Strawberry Perl 5.20。

In both cases, when I open cmd and type 'perl' I get: 在这两种情况下,当我打开cmd并键入'perl'时,都会得到:

Unknown Unicode option letter ':'. 未知的Unicode选项字母':'。

This error also prevents all scripts from running on my Windows 8.1 installation. 此错误也阻止了所有脚本在Windows 8.1安装上运行。

I uninstalled Perl and did a fresh install and it still doesn't work. 我卸载了Perl并进行了全新安装,但仍然无法正常工作。

Are there dependencies that I need to install? 我需要安装依赖项吗? I googled the error but the results pertain to Linux installations where the script specified something wrong. 我搜索了该错误,但结果与该脚本指定了错误的Linux安装有关。 But I get this error when I even try to use any perl command line or script. 但是,当我什至尝试使用任何perl命令行或脚本时,都会出现此错误。 So my problem is not a faulty script. 因此,我的问题不是错误的脚本。

That is the error message you get from using an invalid value for the -C command-line option. 那是您通过对-C命令行选项使用无效值而收到的错误消息。 At a guess I'd say you have the PERL_UNICODE environment variable set to a string that contains a colon : . 我猜你的环境变量PERL_UNICODE设置为包含冒号的字符串:

Take a look at Command Switches in perldoc perlrun for more detail on this. 有关更多信息,请查看perldoc perlrun中的命令开关

I too had this problem on windows 8.1 . 我在Windows 8.1上也有这个问题。 The problem is that, once on installation, .pl files are not automatically recognized by Perl engine. 问题在于,一旦安装,Perl引擎将不会自动识别.pl文件。 So please select a .pl file and right click and say open with and set the default program to C\\perl\\bin\\ inside it click perl.exe and recognize it. 因此,请选择一个.pl文件,然后右键单击并说打开方式,然后将默认程序设置为C \\ perl \\ bin \\,然后单击perl.exe并识别它。 Once this is done your perl works flawlessly. 完成此操作后,您的perl即可完美运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM