Thanks for all the help on DTDs.. enlightening.

Here's a fairly bare-bones version of my script that I have confirmed still exhibits the same behavior:

#This script recieves valid data POSTed to it from an HTML form. use CGI qw/:standard/; use CGI::Pretty; ### HERE IS THE PROBLEM: ############################################# +######### ##Un-comment one or the other of these next two lines to reproduce the + problem# # + # #print "Content-type: text/html\n\n"; #Using this line works beautifu +lly. # # + # #print header(); #Using this line stalls the browser. + # # + # ###################################################################### +######### print "<HTML><HEAD><TITLE>Confirmation</TITLE></HEAD><BODY BGCOLOR=\"3 +355ff\">"; print h1('Header'); print h4('Trying sysread..'); $data = try_sysread(); print $data; print h4('Sysread done..'); print end_html; exit; ########## sub try_sysread(){ sysread(STDIN,$d,$ENV{CONTENT_LENGTH}); return $d; };
params() was a good idea, but then I tried Vars() and it works beautifully with any decent header, once I noticed that you have to import the *:cgi-lib* functions from CGI.
Assuming I hear of nothing dangerous or evil about Vars(), I'll use it.

I still don't know why this sysread thing happened, though.. any ideas would still be appreciated, if only for the joy of abstract knowledge (especially for the joy of abstract knowledge.. practical knowledge hurts when you don't have it.)

==========

Can an atheist be insured against acts of God?


In reply to The code, a solution, and many many thanks by PiEquals3
in thread CGI::header() & What's !DOCTYPE..? by PiEquals3

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.