I found a useful link that will help you in running a perl and cgi script ( files with extension .pl or .cgi ). It has got step by step explanation of the installation . I was successful in running the cgi in my PC. I hope you might get lucky too.
For detailed setting of perl :
Visit : http://www.chromicdesign.com/2009/05/setting-up-perl-for-wampp.html
By doing the following easy steps , you will be able to run a cgi script and see its effect .
1. Download ActivePerl ver 5.10.0.1005 from
http://www.activestate.com/activeperl/
or
2. After installing ActivePerl , run the wamp
server.
For testing purpose , I have given some test codes below :
you need to create 2 files inside a new folder under www directory of wamp :
- cgi_form.html
- backatcha.cgi
then run the cgi_form.html under wamp server.
Example file :
Create a file named cgi_form.html
<html>
<head>
<title></title>
</head>
<body>
<form action="backatcha.cgi" method="GET">
<p>What is your favorite color?
<input name="favcolor" /></p>
<input type=submit value="Send form" />
</form>
</body>
</html>
Create a file named backatcha.cgi
#!C:\wamp\bin\Perl\bin\perl.exe
use 5.010;
use CGI;
use strict;
use warnings;
my $q = CGI->new();
say $q->header(), $q->start_html();
say "<h1>Parameters</h1>";
for my $param ($q->param()) {
my $safe_param = $q->escapeHTML($param);
say "<p><strong>$safe_param</strong>: ";
for my $value ($q->param($param)) {
say $q->escapeHTML($value);
}
say '</p>';
}
say $q->end_html();
then , run the wamp server ,
and open the cgi_form.html
( for example : http://localhost/cgi/cgi_form.html )

- cgi_form

- cgi_result
Filed under: Perl and CGI | 5 Comments


Your blog is so interesting! I have subscribed on rss and I will read it regullary/
Awesome blog! Subscribed on rss. Regular will read it. Good job.
Excellent blog! Very interesting themes. I will allways read it. Also e-mailed on rss.
Nice blog! Very interesting aspects. I will often read it. Also subsribed on rss.
Good blog! Very interesting themes. I will regularly read it. May i post your backlink on my page?