Hi
pvilleSE,
I notice that this is your first post (under this username at least), welcome to the Monastery.
Let us see if I am following this:
You have a web page which calls a Perl scriptHow is this being called? Server side include? A form which gets submitted, or a link that is clicked?.
The Perl script changes the contents of a file, and you wish to output the contents of said file to the screen.
I think the way I would do this would be not to use JavaScript to display the contents of a file, but to use Perl itself. Perl is more than capable of creating dynamic content driven html, meaning you could have a Perl script display a page with the content you wish already inside it. Have a look at
CGI if you have not already done so. The
Tutorials section of this site has many great
tutorials on this and the use of
html templating systems (and many other topics), which should help you in what you are trying to do.
Should it be that I have missed the mark on what you are trying to achieve, let us know by providing a more detailed description of what you are trying to do (break it down step by step if you have to), and any code you already have.
Hope this helps.
Martin
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.