Reputation: 51
I am new to xampp, and also, I am new to Perl programming. I just tried to open the file C:\xampp\cgi-bin\printenv.pl and I made a mistake.
I chose the default program to open that file extension as Notepad, with the option always use the selected program to open this kind of file
.
Now when I try to run .pl files from cmd it opens them in Notepad instead of executing. Please reply. Thanks in advance.
Upvotes: 5
Views: 2995
Reputation: 4077
ikegami's suggestion did not work for me in Windows 10, but after finding Jack Wu's comment at ActivePerl. .pl files no longer execute but open in Notepad instead I was able to solve the problem as such:
Perl5.16.3.exe
(or the equivalent, depending on which version of Perl you have installed: but not Perl.exe
)Then the Perl icon appears next to .pl files and a double-click leads to them opening in Perl every time, as desired.
Upvotes: 2
Reputation: 386416
Type the following at a shell prompt:
assoc .pl=PerlScript
ftype PerlScript="c:\...\bin\perl.exe" "%1" %*
(Replace ...
with the correct path.)
Upvotes: 9