Today I want to discuss installing and configuring perl on your
windows PC so you can write and test your scripts there before uploading to
First of all, if you have Win95, win98, win98SE or Windows ME, go to control panel, add remove programs, windows components, and make sure "PWS" (Personal Web Server)is installed. If you have WinNT, Win2000 or WinXP go to the same place, and make sure "IIS" (Internet Information Services) is installed, in either case you will probably require your windows CD.
Once you have done that, you basically have a web server running on your PC, so make sure you run "Windows update" and get any patches Microsoft have released for your version of windows. There were some nasty bugs (like Codered and Nimda) that would not have happened if people kept their systems up to date.
(Don't skip this step, its probably the most important thing in this tute.)
My servers are still getting alot of Nimda infected servers trying to infect mine, (kinda pointless cos Linux is essentially unaffected by virus's, but it still wastes my bandwidth.)
Now fire up your browser and go to: Get ActivePerl (It's a free download or you can order it on CD.)
Thats the download page for ActivePerl, if you have 95, 98 or ME you will need to update to "Windows installer 2" and if you have 95, you will also need to download and install DCOM.
All of these are available on that page above and all are just download and double click programs, so no instructions are necessary here.
Download and install ActivePerl last.. (the link above has a download link, you will have to register, but that just entails giving them your name and email.. (use a hotmail or yahoo mail if you want, but they don't spam you so its not worth it.)
Anyway, the file you want is the .MSI file, that will be the easiest way.. the other is a zip file.. It's bigger and more of a pain to install so go with the MSI file, (which is why I suggested updating to Microsoft installer 2.) Only resort to the zip if the MSI doesn't work for you. (Its always worked for me, but I have heard of problems for others.)
None of this actually costs anything incidently. the file you want to be downloading is:
The file is 15.5 MB in size. (This file
is probably outdated now, but the newer version is available on that page.)
On dialup, you can expect it to take about 30-50 minutes.
If you have updated your system appropriatly as mentioned above, just save the ActivePerl-220.127.116.110-MSWin32-x86-274739.msi file somewhere, browse to it and run it, it has a lovely GUI that will step you though the process nicely.
It will also configure IIE and PWS to use the .pl extension for perl scripts. (if you want to know how to do the same for .cgi, ask in the htmlfixit mailing list or forum and I'll fill you in.
You'll also probably be asked some questions about Isapi during the install, go with the defaults and you'll be fine.. (Isapi is like a turbo button for perl scripts similiar to mod_perl on linux, but it is by no means compulsary.
I don't use it.. have no need.)
Once the install is finished, you'll probably have to reload windows, and once that is done, you are ready to start scripting.. easy huh?
If you don't want to use MicroSoft web servers, (which no one will tell you is a bad idea, due to the number of security flaws that have been found in MicroSoft software.) You can download a version of Apache for windows, and use that with perl, but thats out of scope here, so I'll give you a url to start you on the track. http://sourceforge.net/projects/webserv/ This install has allot more than just Perl, it has everything to get you started with MySQL backed programs as well (and more).
Congratulations, you now have Perl installed on your machine, (there is probably a c:\perl directory on your system now) and you will want to write some scripts. I'll be getting into that in the coming primers.
NOTE: To install Perl on linux or *BSD machines, search your distributions web pages, the chances are that it is either already installed, or its available on the setup disks.
So if you are ready to learn more:
Back to the Tutorial Index