I can't provide a test/demo snippet, but you might want to look at Tk::After (or Tk::after); it may be possible to set up a repeating event, at some specified msec interval, which will invoke a callback that you specify. This will be affiliated with some particular widget (might as well be "$mainwindow"), and the callback could include something (I forget what, exactly) that will trigger a cycle of the Tk event loop (refreshing all the widgets).
The only thing that might be an issue for you is whether you can set up the file handle that reads from the other perl script so that it does non-blocking i/o. That is, if the "Tk::After" event fires, and your callback goes to the file handle to read from that other script, and that script has not produced any output yet, then your Tk GUI will just "wait" (user activity will be stalled) until something comes in on that file handle -- unless the file handle is set up for non-blocking i/o, in which case, a read will always return immediately (and just not provide any data if there was none available).
That might be the issue that is the basis for the Tk::fileevent limitation to non-MS systems. Good luck.
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.