Premature end of script headers in perl script

‘Premature end of scrip headers’ error message refers to the script being stopped for whatever reason before it actually return any output to the browser.

The first time to check is to ensure the below codes are output first

print "Content-type: text/html\n\n";

And then to debug the error, simply add the below line(preferably after the above code).

use CGI::Carp qw(fatalsToBrowser);

Related posts

Change Outlook’s offline folder file location

Non-Unicode program displaying Chinese characters as box/square in Windows 7

Blue screen in Windows 7 when turning on AHCI in BIOS