First allow me to apologize for not having an example of the script in question and for my inexperience in HTML, CGI, and Perl (Hey, you gotta start somewhere). The script is on my PC at work, and since we are having problems due to one of Sprint's routers according to SWBell, I am having to try to post this from home. I am writing a CGI script in which a user is able to choose a report (.TXT file) generated on a particular day by our OS/390 that has been ftp'ed to a certain location. This report will then be opened in the user's browser. I am able to identify the user, show the user a list of allowed reports, access the network drive, and retrieve this report. When the report appears in the browser it is not formatted. All (or most of) the spacing is taken out. I am wanting the ASCII file to appear the same (or better) as it would if I were opening it in Notepad. Also, most of these reports are printed on paper that is 14 7/8 inches by 11 inches. Is there a way to format the text in the browser to where the user will be able to see most if not all of the (width of the) file with out scrolling far to the right (or left)? Thanks for the advice in advance.
Blacksmith.

In reply to Formatting a text file for browser by blacksmith

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.