HTTP is a stateless protocol. Whenever someone views your page they will get whatever your program outputs. If you want to display a running log of lines, you will need to store the information somewhere (a log file usually) and then display it.

Update: After messaging with dragonchild for a bit, I think I need to clarify what I think the OP is asking.

From what I can undertstand, the OP has a subroutine that generates new data each time it's run. This information is displayed on a web page. This is where I'm a little confused. Does the OP want to display the old information in addition to the new information, or just display the new information, but keep a copy of the old information somewhere else?

Maybe I'm just not thinking too well today, but dragonchild has me questioning what I'm reading in the question. :)


In reply to Re: Accumulate results from multiple CGI calls for browser viewing by Belgarion
in thread Accumulate results from multiple CGI calls for browser viewing by Anonymous Monk

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.