Getting started with ActivePerl on Windows

Running Perl scripts from the command line

To run your Perl scripts, enter the following command at the command prompt:

  perl -w

Where is the name of the script you want to run. If you are using Windows and have associated the extension of the file with Perl, typing (that is, without calling perl first) will also launch the script.

Sample Script

In the /eg directory of your Perl install there is a sample script named To run it, launch a console window (command prompt), navigate to the /eg directory, and type:


You should see:

  "Hello from ActivePerl!"

If you do, you have successfully installed ActivePerl! If not, there’s something wrong with your installation. Check to make sure that your PATH environment variable includes the directories to which you installed the Perl core binaries. You can type set at the command prompt to see what’s in your Path. If you chose the defaults during the install, these should be set to the correct values for you when you start a new command prompt window. If you continue to have problems, refer to Installing ActivePerl for Windows

Note: Typing perl -h will print a screen of all of the available command line options.