Execute Perl Scirpt in Xampp !!

We Can Execute Perl script in Two ways !

      *) Commond Line Execution.
     *) Webbased Execution.

Command Line Execution :

                 Place your perl script on this path like test.pl
Script is.

#!”D:\xampp\perl\bin\perl.exe”
print “Hello World”;
 
                 Go to command prompt and go to perl path like D:\xampp\perl.

run it as D:\xampp\perl>perl test.pl

Webbased Execution :

               Second way is to execute through web. Place your perl scirpt file at path D:\xampp\cgi-bin

Make sure that the Apache configuration file
               D:\xampp\apache\conf\httpd.conf

this script

ScriptAlias /cgi-bin/ “D:/xampp/cgi-bin/”

to be not been commented and the folder name should be same as the apache settings. Now start apache and place the url as

Place the perl script at D:/xampp/cgi-bin/test.pl

test.pl has the perl code has you should say the header type as print “Content-Type: text/html\n\n”; for web based execution.

#!”D:\xampp\perl\bin\perl.exe”
print “Content-Type: text/html\n\n”;
print “OK”;

http://localhost/cgi-bin/test.pl

Your perl script will get executed. Enjoy !!

            


                   

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: