
pranavkojha
New User
Feb 24, 2008, 8:14 AM
Post #1 of 4
(18025 views)
|
Perl CGI script doesn't execute
|
Can't Post
|
|
I am not able to get desired output in HTML using a small perl script. When I execute the below script it outputs the text fine (using 'perl test.pl' command). However, on my browser, when I key in the address of the script "http://localhost/test.pl", I get output as the script itself. I have given the execute permission for the script but it still doesn't work, also the path of 'perl' is correct. I just want the output as "Perl works!". Here is the script I have been working on,
************************** #! /usr/bin/perl use strict; use CGI':standard'; print "Content-type:text/html","\n\n"; print "<html><body>"; print "<br>"; print "Perl works!"; print "</body></html>"; ************************** Any help? System info: Fedora core 5 Apache server
|