Sorry, let me try again. I typed too fast on this node, hence the mistakes. The issue is that:
$cgi->header('text/plain');
Gives me the HTTP 200 (but doesn't show any subsequent print statements), while
$cgi->header('text/plain'), "\n";
Allows the page to render normally.
You asked what I am trying to do: I have many scripts that outputs to a text-file. Rather than reformatting for the web, I would like to just add code to the top like:
use CGI;
$cgi->header('text/plain');
and have the text show up, just as it would if it had been giving output to screen. |