in reply to Formatting a text file for browser

Also, you should be able to do this by telling the browser that the file is of mime type text/plain, not the default text/html. If you are using the CGI module (as you should be), then you just need to add some arguments to set the content type to the header method, changing code like this:

print $q->header;

to something like this:

print $q->header(-type=>'text/plain');

(If you are using the function-oriented interface to CGI it's the same, of course, just omitting the $q->.)

(As always the CGI.pm docs are your friend.)