Perl on Windows

1. Go to Follow the links to find the most current version of Perl. Download and install on your PC. You will be asked where you would like to install perl. Here we assume you have installed in c:\perl

2. You would need to run Perl under MS-DOS PROMPT. MS-DOS PROMPT usually can be found on the Start/Programs menu and in the Windows folder. Or search for DOSPRMPT using the Search function. Once you have located the MS-DOS PROMPT make a short cut to the application and double-click to start a new window.

3. You can write a script in a text editor, save it as a file, and call it from the command line. For example, save the following in a file name

#!/usr/bin/perl print "Perl on PC\n";

Change to the directory where your file is stored. Use cd for change directory and dir for listing the directory content in the MS-DOS window. Make sure your syntax is correct, and type c:\perl\bin\perl to run the script.

4. You can avoid typing the full path c:\perl\bin\perl by setup a Path. Go to Start/Run..., in the Run window type "msconfig" then hit "OK". This will lead you to "System Configuration Utility". Click on Environment. Click on PATH and then Edit. At the end of the "Variable Value" add "c:\perl\bin". Note each individual PATH variable value is separated by ";".

5. Now click on "Apply", close the "System Configuration Utility" window, and restart your computer.

6. In the MS-DOS window, you may run your perl script using perl