I am encountering the above error.
The main script is under below
#!/opt/lampp/bin/perl
use lib "/opt/lampp/htdocs/PERL";
use warnings;
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
use WEBPAGE::PageDesign;
use HTML::Form;
my $header = get_header() ;
my $html = parse_form(\%ENV);
print "Content-type: text/html\n\n";
print <<HTML;
$header
$html
HTML
The html generated is being proper, yet the script with html page followed by the error
Error message:
<br />malformed header from script. Bad header=<body>: publish_scholarship.pl,
Move the print header line to the top. If it still not working then move it to BEGIN block.