in reply to strange newline behavior in Win32 with CGI.pm and STDOUT

From the CGI docs:

PRETTY-PRINTING HTML

By default, all the HTML produced by these functions comes out as one long line without carriage returns or indentation. This is yuck, but it does reduce the size of the documents by 10-20%. To get pretty-printed output, please use the CGI::Pretty manpage, a subclass contributed by Brian Paulsen.
use CGI::Pretty; print "foo\n"; print "bar\n";

Does what you mean.


DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^2: strange newline behavior in Win32 with CGI.pm and STDOUT
by Errto (Vicar) on Dec 06, 2005 at 01:39 UTC
    I should have mentioned this isn't actually a CGI script. I need CGI.pm (or really CGI::Simple but same deal) for other purposes. When I run my program STDOUT is actually redirected to a file.