I'm new to CGI/Perl and learning via a book (please be gentle).
Anytime I try to run a CGI file I get "500 Internal Server error". When I check my error log I see "Premature end of script headers". I've tried multiple "Hello World" scripts to no avail. What am I doing wrong?
CODE
#!/usr/bin/perl
use CGI;
$query = new CGI;
print $query->header;
print "<html><head><title>A test</title></head>\n";
print "<body>Hello World</body></html>";
use CGI;
$query = new CGI;
print $query->header;
print "<html><head><title>A test</title></head>\n";
print "<body>Hello World</body></html>";