Perl cgi help [Answered]
Posted: 17. September 2012 17:13
Hello, I would like to know how do you run perl or cgi script with XAMPP?
Here is portion of my code that I wrote while back, that does some ajax work...
I don't think there's any problem with the code, and I changed the shebang line...
I drop the folder in htdoc and cgi-bin folder, tested both. In the browser only the html works, and nothing else
nothing in the error log...
any help would be appreciated, thanks...
Here is portion of my code that I wrote while back, that does some ajax work...
- Code: Select all
#!C:\xampp\perl\bin\perl.exe
#open data file to get all previous received data
open IN, "data.txt" or die "Cannot open: $!\n";
@DATA = (<IN>);
close IN;
#Will append new received data into data.txt
open OUT, ">>data.txt" or die "Cannot open: $!\n";
#receive data via POST method
read (STDIN, $data, $ENV{'CONTENT_LENGTH'});
@data_array = split ("\&", $data);
#STDOUT HTML header
print "Content-type: text/html\n\n";
#do something here.....
I don't think there's any problem with the code, and I changed the shebang line...
I drop the folder in htdoc and cgi-bin folder, tested both. In the browser only the html works, and nothing else
nothing in the error log...
any help would be appreciated, thanks...