ActivePerl faq1 - Availability and Installation
Getting, installing, and using Perl.
Perl is a scripting language widely used for system administration and programming on the World Wide Web. It originated in the UNIX community and has a strong UNIX slant, but usage on Windows is growing rapidly. ActivePerl is a port of core Perl to Windows.
perl (small 'p') is the program used to interpret the Perl language.
Extensive online documentation is included with Perl itself. You can read the
documentation with the
To get more information about Perl, check out these URLs:
There are several good books about Perl. The premier book on ActivePerl is Learning Perl On Win32 Systems By Schwartz, Olson, and Christiansen (O'Reilly & Associates, 1997). This is the Gecko book, and has a picture of a gecko (little chubby lizard with big toes and a smile) on the front cover.
For general perl, two books to consider are Programming Perl, 2nd Edition, by Larry Wall, Tom Christiansen and Randal L. Schwartz (O'Reilly & Associates, 1996) and Learning Perl, by Randal L. Schwartz (O'Reilly & Associates, 1993). These are referred to by Perl enthusiasts as the Camel book and the Llama book, respectively.
If you are new to Perl and there are any terms mentioned in this FAQ that you don't get, try one of the above resources. See the perlbook document that comes with Perl for more information.
ActivePerl is available from the ActiveState home page.
To download ActivePerl from ActiveState, look in this directory:
ActivePerl is a complete, self-installing distribution of Perl based on the standard Perl sources. It is distributed online at the ActiveState site.
"Perl for Win32" generally refers to ActivePerl for Windows.
Perl for Win32 was developed by ActiveState Tool Corporation (originally Hip Communications) for Microsoft Corporation. This effort was undertaken for inclusion in Microsoft's Windows NT Resource Kit.
Since then, ActiveState and various Perl porters have worked to keep ActivePerl current with the standard release of Perl. The oneperl effort, a joint effort between ActiveState, O'Reilly, and various volunteers, has joined the Win32 and standard Perl source code into one common source tree.
Simply double-click the archive you downloaded, and you will be guided through the installation process by the installation wizard. You can select the parts of the Perl package you want installed, and the location you want to install them to.
Go to Add/Remove Programs in the Control Panel, choose ActivePerl from the list box, and click Remove.
ActiveX Scripting is a Microsoft technology that consists of script engines and script hosts. A script engine, such as PerlScript, VBScript, or JScript, is a programming language that can be embedded in a scripting host, such as Windows Scripting Host, Microsoft Exchange, and Active Server Pages (ASP).
Yes. This is called PerlScript. It is part of ActivePerl, and can be optionally installed during installation.
PerlScript can be used within any ActiveX Scripting Host such as Microsoft Internet Explorer 4.0, Microsoft Exchange, and the Windows Scripting Host.
When I double-click the perl.exe icon in Explorer, I get an empty DOS window with a blinking cursor.
ActivePerl is a command-line program. It expects to be run from the command line, not from Explorer.
If you want to run a Perl script, write the script out using a text editor like Notepad. A good starter program is:
print "Hello, World!\n";
Save the program to a file (such as C:\temp\hello.pl). Now, start a command prompt window (sometimes erroneously called a DOS window), and type the following line at the command prompt:
C:\> perl c:\temp\hello.pl
This should print out the words
perl.exe has a lot of nifty command-line arguments that can make your work easier. See perlrun for details.
To answer the original question about what's happening when you start perl from an Explorer window rather than a command-line window: starting from Explorer is roughly the same as starting perl without any command line arguments. When perl is started without a script file specified on the command line, it expects to receive a Perl program as standard input, i.e., from the keyboard.
The blinking cursor means perl is waiting for your input. You can actually type in a Perl program from the keyboard, and then tell perl to execute it by typing the Ctrl-Z, which is the end-of-file marker on Windows systems.
How can I get Perl to run a Perl script at the 4DOS command line by typing the name of the script without the extension or "perl", just like a regular exe file?
You can add a line like
to your AUTOEXEC.BAT file under Win95/98. You can then type <scriptname> with no extension to run your script, even if you are not in the same directory as the script and the script path is on your path.
Note, however, that this only works with 4DOS, not COMMAND.COM, CMD32.EXE, or CMD.EXE. With those shells you still need to type
perl scriptname.pl <arg> <arg> <arg>
The Perl source code includes complete instructions on building Perl. You can obtain the latest Perl source from:
Once you extract the source, read the README and README.win32 files for instructions on compiling Perl.
You can use the following C compilers to build a native Win32 build of Perl:
This FAQ was originally assembled and maintained by Evangelo Prodromou. It has been revised and updated by Brian Jepson of O'Reilly & Associates, David Grove, David Dmytryshyn and David Sparks of ActiveState.
This FAQ is in the public domain. If you use it, however, please ensure that you give credit to the original authors.