How to Configure Perl in XAMPP

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.

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.

Video of the Day

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:



<Directory "/xampp/test-perl-scripts"> <FilesMatch ".pl$"> 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.



references & resources

Report an Issue

screenshot of the current page

Screenshot loading...