Perl未在Windows 10中运行 [英] Perl not running in Windows 10
问题描述
我刚刚在64位笔记本电脑上下载了Windows 10的ActivePerl,但是当我转到命令提示符时,除非目录为C:CPerl64\bin,否则perl -v失败,在这种情况下它告诉我我有Perl 5.20.2版权所有Larry Ullman等,但是如果我尝试在任何地方打开perl文件,都不会发生任何事情,如果我运行perl.exe,它只会显示一个带有闪烁栏的命令窗口,并且什么也没有发生,当我尝试在Eclipse中运行.pl程序,可以预见地告诉我,由于perl-v失败,它将无法运行。
I've just downloaded ActivePerl for Windows 10 on my 64 bit laptop, but when I go to the command prompt, perl -v fails unless the directory is C:\Perl64\bin in which case it tells me that I have Perl 5.20.2 Copyright Larry Ullman etc, but if I try and open perl files anywhere, nothing happens, if I run perl.exe it just shows me a command window with a flashing bar and nothing happens, and when I try and run .pl programs in Eclipse it tells me predictably that because perl-v failed it won't run.
如何使.pl文件运行?
What can I do to get .pl files running?
推荐答案
必须在.pl文件扩展名和Perl运行时之间创建文件关联。
You must create a file association between the .pl file extension and the Perl runtime.
在命令提示符下,键入以下内容。
At a command prompt type the following.
assoc .pl=PerlScript
ftype PerlScript=c:\perl\bin\perl.exe %1 %*
根据需要获取可见的命令窗口,选择perl.exe或wperl.exe。
Choose perl.exe or wperl.exe, depending on your need to get a visible command window.
这篇关于Perl未在Windows 10中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!