CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Unwanted newlines in cgi output

 



ChuckC
Deleted

Jun 23, 2000, 5:10 AM

Post #1 of 3 (646 views)
Unwanted newlines in cgi output Can't Post

I'm stumped.

Periodically, when I test my CGI scripts, an extra newline character is inserted. Of course, I only notice this when the newline gets inserted where it causes damage, such as:

<INPUT TYPE="HID
DEN" . . .

which results in a text box appearing on the page, with data I had intended to hide!

I have $| set to 1.

I am using
print <<EOF;
. . .
EOF
in places, but replacing that with a series of print "..." doesn't seem to help (unless perhaps I need to do that through the whole script, which is a lot of work to go through to make a script less readable).

Reloading the page doesn't change things.

If I add text to the output, I can MOVE where the extra newline goes, sometimes to a point where it causes no damage, but not always.

This seems to only be a problem with largish files . . . perhaps hinting at a buffer problem of some sort??

My server is using Netscape-Enterprise/3.6 SP3 software.

I'm running Perl v5.6.0 built for sun4-solaris.

Any suggestions would be greatly appreciated!

- Chuck


dws
Deleted

Jun 24, 2000, 12:14 PM

Post #2 of 3 (646 views)
Re: Unwanted newlines in cgi output [In reply to] Can't Post

Might your text editor be at fault? Pico is notorious for adding hard linebreaks.


ChuckC
Deleted

Jun 26, 2000, 3:11 AM

Post #3 of 3 (646 views)
Re: Unwanted newlines in cgi output [In reply to] Can't Post

I don't think so. I'm using plain old Notepad on a PC, and then ftp-ing the files over to a Sun.

Thanks for trying.


- Chuck

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives