Make Apache recognize Perl!
May 28, 2008 5:49 AM Subscribe
How can I get my web server to interpret perl
posted by kaozity to computers & internet (7 answers total)
I am playing around with perl for the first time in my life. I am using a fedora core 8 machine. It seems to ave all the essentials installed already (apache, php, mySQL, and perl). However, I make a file called perl.pl and it does not seem to translate correctly. Here is what is in the file:
print "Content-type: text/html \n\n"; #HTTP HEADER
# DEFINE SOME SCALAR VARIABLES
$number = "5";
$exponent = "2 ** 8";
$string = "Hello, PERL!";
$stringpart_1 = "Hello, ";
$stringpart_2 = "PERL!";
$linebreak = "
"; #HTML LINEBREAK TAG
# PRINT THEM TO THE BROWSER
When you go the the browser, you see the following
As you can see, you prints out exactly what I type. Am I doing anything wrong? Am I suppose to enable a perl service or change a configuration file?