Hi Friends, can any one tell me taht i am not able to run my script on webpage but it is running in command promt & I am also try Cgi module but i am not suceed can any one help me. my script is-- and i am also attached the file bionet for the list of restriction enzymes.

# Extract the DNA sequence data from the contents of the file "sample.dna" $dna = extract_sequence_from_fasta_data(@file_data); # Get the REBASE data into a hash, from file "bionet.txt" %rebase_hash = parseREBASE('bionet.txt');

web browser communicates with the remote (or local) host using the http protocol. however the the browser itself is not able to execute the script and the perl interpreter can not process http requests. So the script execution should be performed by some server which will 1. accept the http request 2. call perl interpreter for requested script 3. retransfer the script response back to browser using http

the following is simple steps make script running under apache 1. ensure the apache should treat the perl scripts as cgi-scripts: apache configuration file httpd.conf should contain the following lines

Code

AddHandler cgi-script .cgi AddHandler cgi-script .pl

2. ensure the script execution is allowed from the folder where the script is (the host aliases to folder should be already set): - for windows:

in addition (for *nixes) the script file attribute should be set as executable (X)

3. ensure the perl interpreter can be found by apache: script's very first line should contain the path to perl (with no any leading characters): - for windows

Code

#!c:\perl\bin\perl.exe

- for *nixes (usually)

Code

#!/usr/bin/perl

4. ensure the script output is browser compatible: - the server response should contain the specific information in the very beginning to instruct the browser how it should understand the incoming data. if the server (script) just types the text (or html) the very first 'print' in the script should be the following:

Code

print "Content-type: text/html\n\n";

finally type the url in the browser like http://host/path/script.pl and you'll see the script output over there