I have a perl app that repeatedly does some text processing, generates some HTML, and then displays the HTML on my screen by opening a browser window with the code:

ActiveState::Browser::open($fullHtmlFileName);

The default browser on my Windows Vista system is Firefox, so this opens a new firefox Tab in the most recently viewed firefox window. If the code is executed again, a new tab is opened, and so on, and so on...

Ideally I'd like to be able to open a new browser *window* the first time that code is executed, and then each subsequent time through the loop I'd like to have firefox (or IE if I have to) just display the new HTML in the same window, without opening a new tab or window.

Actually, I guess the truly perfect behavior would be to check to see if a browser window with a particular title is already open on my machine. If not, open a new one. Then display the HTML in that window.

Can anyone assist me in making this work? thanks in advance...

In reply to Controling browser behavior from Perl by huge

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.