If you're printing out the lines, but they aren't printing as you would like, your problem is probably that you're printing plain text but your browser is expecting HTML. This suggests two solutions:
- tell your browser to expect plain text, or
- have your script print valid HTML.
It's probably easier to accomplish 1 than 2: just change the string "Content-type: text/html\n\n" to "Content-type: text-plain\n\n" and you should get a readable, if boring, output. If you want to output HTML, you should look at using CGI.pm, which makes it fairly easy to do such things.
And yes, please do read the links proposed above by cjf--they will make your life easier and get you better answers faster.
If God had meant us to fly, he would *never* have given us the railroads.
--Michael Flanders
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.