Hello,
I am using WAMP to practice with CGI and Perl.
My problem is when I execute the cgi script, Firefox shows it as HTML source code, but I am not in page source view.
Below is the code I am using:
#!D:/perl/perl/bin/perl.exe
#use strict;
#use diagnostics;
#use CGI::Carp 'fatalsToBrowser';
#use CGI qw(-debug);
print "Content-type: text/plain\n\n";
print "<html><head><title>Hello World</title></head>\n";
print "<body>\n";
print "<h2>Hello, world!</h2>\n";
print "</body></html>\n";
This is what Firefox shows: <html><head><title>Hello World</title></head>
<body>
<h2>Hello, world!</h2>
</body></html>
I searched on Google, and found that I should add "AddType text/html .html .htm", but that did not help either.
Any idea why this could be happening?
Thanks!