http://www.perlmonks.org?node_id=476193


in reply to Yet Another Premature End of Script Headers Question

I would make CGI.pm do the header for you:
use strict; use CGI; my $header = CGI->new()->header();