500エラーについて教えて下さい。

・print "Content-Type: text/html\n\n";以降の行にコメントを書く → 500エラー

・HTML::Templateのサンプルそのままコピって、my $tmpl_out = $template->output; → 500エラー
 my $out = $template->output;
 print "$out";ならセーフ。

ちょっと厳格すぎる気がするのですが、こんなモンでしょうか?