How to Configure Perl in XAMPP

By Sean Mann

Configuring the Perl add-on in XAMPP is important when you want to change a default setting, such as the Perl script directory. XAMPP is an Apache distribution which includes add-ons such as MySQL, Perl and PHP built into the basic package. Apache is software that lets you host a Web server. XAMPP configures Perl for you during installation. Configure the Perl add-on further by modifying the "httpd-perl.conf" file, which stores the Perl settings.

Step 1

Download the XAMPP installer from their website and run it to install XAMPP, which includes Perl as part of the basic package since version 1.7.2.

Step 2

Start the XAMPP control panel and click the "Stop" button next to the "Apache" text. This stops the Apache service.

Step 3

Open your XAMPP's "httpd-perl.conf" file in a text editor such as Windows Notepad. The file is in your "\xampp\apache\conf\extra\" directory. This contains the Perl configuration settings.

Step 4

Modify the Perl settings that need to be altered. For example, add an additional directory that will process Perl ".pl" scripts by adding the following text on a new line: SetHandler cgi-script

Step 5

Save the "http-perl.conf" file and close your text editor.

Step 6

Switch back to the XAMPP control panel and turn the Apache service back on by clicking the "Start" button next to the "Apache" text. This loads your new Perl configuration settings.