Perl not running in Windows 10

10,515

Solution 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.

Solution 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

Share:
10,515

Related videos on Youtube

Qiri
Author by

Qiri

Updated on June 04, 2022

Comments

  • Qiri
    Qiri almost 2 years

    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?

  • Qiri
    Qiri over 8 years
    When I try typing assoc .pl=PerlScript I get an error saying "Access is Denied. Error occurred while processing .pl."But I am on an admin account with User Account Control turned off, so I should have full permissions to do everything.
  • Qiri
    Qiri over 8 years
    Thanks very much, it should have occurred to me to run it as admin when I got the access denied error, but thanks for that and for the code above. Everything is now working, perl -v shows what it should and I have hello world working in Eclipse. Do you mind telling me what the %1 %* meant at the end of the ftype command?