in reply to I think I'm misunderstanding $|

Am I misunderstanding how $| works?
Probably not. But there are other errors.
select(STDERR); $| = 1;

Well, no error, but need for that. STDERR is auto-flushed by default. Delete those \n\n after your Content-type header. Those are an error.

Typo here:

#reads the input values here print END_HTML; <title>PAGE TITLE</title>

should be

print <<END_HTML;

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^2: I think I'm misunderstanding $|
by sigmazero13 (Novice) on Dec 17, 2007 at 22:46 UTC
    Oops, sorry about the typos. I guess I didn't realize that about STDERR, I'll take that part out. (I'm actually updating someone else's code here, but that doesn't absolve me of not cleaning it up properly). As for the \n\n after the Content-type header, why is that an error? It prints correctly. I didn't put them there specifically, but I think the original author did that to ensure that the HTTP Header was definitely "done" before starting (but I could remove it).
      Content-type: text/html \n\n <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML>

      places 4 newlines bewteen "html" and "<!DOCTYPE", which means "<!DOCTYPE" is on the third line of the body but I think the specs requires it to be on the first line. Just leave a blank line between "html" and "<!DOCTYPE".