How To Guides Org

Perl is not recognized as an internal or external command in Windows 7

I recently got into Perl and somehow Windows would not accept the path when I manually added it to the environment variables. Here’s the solution.


Whenever you want to add new system environment variables you can do that by simply adding the path to the executable to the existing PATH variable on your System Properties. To bring up the screen below, enter System environment variables into the search bar on your Start menu, then click on the button Environment variables at the bottom and you get this:

Add the path C:\Perl64\bin separated by a ; to the existing PATH variable. If it doesn’t work see below

Solution: Set Path via CMD

However, if that does not work and you still get the error Perl is not recognized as an internal or extermal command, you can set the Perl path using the batch command set PATH:

set PATH=C:\Perl64\bin;%PATH%

I’m assuming here that you are on a Windows 7 64-bit system and installed Perl to C:\Perl64 – if that is not the case, simply change the path.

Perl is quite useful on Windows as well. Some handy Perl programs like Imagemagick also work on Windows. You don’t always need to use Linux and I try to use Windows whenever I can. (Note to myself: Should probably start an Ubuntu site for all the Linux newbies out there)