How To Install Perl on a WAMP Server
Step 1:
Download and install WAMP server (WampServer), default installation is c:\wamp. Installing WampServer is not in the scope of this, “how to”. You can read my article on WAMP vs. IIS for a better understanding of WAMP.
Step 2:
Download and install Active Perl from http://www.activestate.com/activeperl/downloads/ ; based on this tutorial, download the Windows Installer (MSI). Run the installer;
- Click Next on the first screen, “Using ActivePerl at work?”.
- Read and accept license agreement, hit next.
- Custom setup screen, choose browse and install it in c:\wamp\bin\Perl\. click next, and keep all the following defaults, and finally install it. It will take some time to install depending on your computer.
- And finally once installed, uncheck, Display the release notes, and click finish.
I chose the installation directory c:\wamp\bin\Perl\, to keep consistency for all apache related applications.
Step 3:
Verify the installer actually wrote the PATH variable in your system. This will save you a lot of headaches. Right click on “My Computer”, select properties, select Advanced Properties, click on Environmental Variables and under System variables scroll down and double click on PATH and verify c:\wamp\bin\Perl\site\bin; is in the Variable value.
Or simply open a command prompt, start> run> cmd> and type:
prompt>perl -vIt should spit out the version of the perl your running.
Step 4:
Configure httpd.conf on WAMP server (WampServer) for perl. Open C:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf, file which is your apache configuration file.
- Look for, Directory “c:/wamp/www/”, and under this line look for and replace:
Options Indexes FollowSymLinks
with:
Options Indexes FollowSymLinks Includes ExecCGI
This will activate Perl for your WAMP server (WampServer), so you can run Perl scripts.
- Look for and replace:
#AddHandler cgi-script .cgiwith:
AddHandler cgi-script .cgi AddHandler cgi-script .pl
This will activate the AddHandler for cgi and pl. These are common, so enable them.
- Look for and replace:
DirectoryIndex index.php index.php3 index.html index.htm
with:
DirectoryIndex index.php index.php3 index.html index.htm index.cgi index.pl
Apache executes these in the respective order; if it doesn’t find index.php it will look for index.php3 than index.html and so on.
Step 5:
Restart WAMP server (WampServer) apache service. Wampserver > Apache > Service > Restart Service. Your server is ready to run, Perl. You can test by downloading this file and placing into one of your development site, c:/wamp/www/dev-site.com/perl-stuff, and executing it via browser, i.e. http://dev-site.com/perl-stuff.
Configuring your WAMP server (WampServer) to run a development site is not in the scope of this, “how to”.


















" Install Perl on WAMP "
I installed it in another directory, but when I typed perl -v, it said “Perl is not recognized as an internal or external command, operable program or batch file” I checked the system variables,
E:\server\wamp\bin\Perl\site\bin;
E:\server\wamp\bin\Perl\bin
But doesn’t work. Any Ideas?
" Install Perl on WAMP "
Johnston
Have you tried rebooting?
" Install Perl on WAMP "
Hey CJ, great article! One issue though. I have no problem with the perl -v, but I cannot open *.pl files (created *.pl files in www/new/)
I receive 500 Internal Server Errors
I’ve restarted WAMP and even restarted the system and then started WAMP.
httpd is updated according to your instructions.
Any ideas?
Thanks!
" Install Perl on WAMP "
You have to add in path :
c:\wamp\bin\Perl\bin, not include “site”
This worked fine for me - thanks
" Install Perl on WAMP "
@dimitris: “You have to add in path :
c:\wamp\bin\Perl\bin, not include “site”
This worked fine for me - thanks”
wat does this mean?
" Install Perl on WAMP "
Hi everything working fine fir me. But when I open perl.pl in my browser it says “Forbidden” You don’t have permission to access /peexam.pl on this server. plzz help
" Install Perl on WAMP "
Same for me, I can’t execute .pl files the code is showing up in browser when I try it.