The answer to the direct question is "no", and that has more to do with the way HTTP and web browsers work than Perl. In general, a web server doesn't normally send just part of a page to replace an existing page. There are ways to do this with JavaScript and other client-side programs as well as with multipart transfers. That's probably not what you want.
A simpler explanation is to generate the HTML page within the CGI program. You'll send the whole thing to the browser, but you'll have the opportunity to substitute in your preferred parameters. If you follow this road, you might end up coding the whole thing as a Perl program, integrating the static HTML page into the program or as a template or something. If there are no parameters passed (that is, the user pressed no buttons, just loaded the page for the first time), send a blank form. If the user pressed a button, perform the appropriate action.
Doing much of anything else makes a lot of assumptions about the web browser. In some cases, you can get away with that.
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.