Perl not running in Windows 10

醉酒当歌 提交于 2019-12-19 03:59:34

问题


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.

What can I do to get .pl files running?


回答1:


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 %*

Choose perl.exe or wperl.exe, depending on your need to get a visible command window.




回答2:


To get perl to be recognized, you must add C:\Perl64\bin to the PATH environment variable. Go to Control Panel > System > Advanced System Settings > Environment Variables. Edit the line containing PATH in the top box marked User variables for , and add ;C:\Perl64\bin (note the semicolon) to the end. Be sure not to corrupt anything that's already there.

installing perl in windows 7



来源:https://stackoverflow.com/questions/34505601/perl-not-running-in-windows-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!