Hi,
I do not know if this is a Perl or html question. Please help.
My Perl script runs at Server Site. When the script gets called, it outputs (prints) a progress html page displayed at Client site. When the program ends, it generates a new html page. This new html page should replace that progress page. However, instead of replacing the ProgressPage, the new html page is appended to ProgressPage. I use Perl here doc to print html pages. Below is the sample code.

First, print Progress Page.

Print <<ProgressPage; <html> <head> ….. </head> <body> ….. </body> </html> ProgressPage

Then, print the new HTML page. I want the new HTML page (NewPage) replaces ProgressPage. But, instead of replacing it, NewPage appends to ProgressPage. Can someone tell me how to replace ProgressPage with NewPage?

print <<NewPage; <html> <head> …… </head> <body> …… </body> </html> NewPage

In reply to How to replace the output (new html page)? by Gary Yang

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.