I'm trying to use the CGI module to write scripts that produce web pages. The header() function is beginning to give me an aneurism.
What I do:
print header();
All I want:
Document-type: text/html
..This is strictly according to the CGI.pm manpage. I expect it to do that.
What I also get:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
...which is fine, I suppose (I trust the module to do the best and newest and most proper thing), except that the !DOCTYPE form doesn't allow my script to properly read input using sysread(). (It hangs until timeout).
Deep breath..
So: What's going on? What is !DOCTYPE for, and why does it appear to break sysread()?
This isn't an urgent problem so much as a very frustrating and confusing one and I'd bet I'm not the only casualty.
Oh yeah: ActiveState Perl build 6xx, NT/IIS 4.0, IE5
..and thanks
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.