OK, I am new to PERL\TK and I am writing a program that will prescreen and wipe out spams from my email box before bothering to download them. I would like to have a window update during the loop so I can gage progress. It seems that the information buffers until the lop is over and then updates. Got any suggestions? The below would check the connection status. it too seems to buffer and then post after the sub completes.
# Check Connection sub connectInfo{ infoCheck(); #getCfgInfo(); $TA -> delete("0.0", "end"); #settings(); $SA -> configure( -text => ''); $SA -> configure( -text => 'Configuration Retrived'); use Net::POP3; my $res = my $pop = Net::POP3->new($popServ, Debug => 1, Timeout = +> 60) or die "Can't Connect: $!\n"; $TA -> insert('end', "Server Available : $popServ\n", reset) if +($res); $SA -> configure( -text => 'Server Check'); $res = ""; $res = $pop->user($popUser); # or die "Can't Authenticate User: $! +\n";; $TA -> insert('end', "User Logged On : Successful\n", reset) + if ($res == 1); $TA -> insert('end', "User Logged On : NOT successful\n", rese +t) unless ($res == 1); $SA -> configure( -text => 'User Check'); $res = ""; $res = $pop->pass($popPass); # or die "Can't Authenticate Pass: $! +\n";; if ($res > 0) { $TA -> insert('end', "Password Author. : Successful\nServer +Responding : $res Messages Waiting\n") ; } else { $TA -> insert('end', "Password Author. : NOT successful ($re +s)\n"); } $SA -> configure( -text => 'Password Check'); $res = ""; $res = $pop->quit(); $TA -> insert('end', "Log Off Server : Clean Logoff\n\n") +if ($res == 1); $TA -> insert('end', "Log Off Server : Broke Connection\n\n") +unless ($res == 1); $TA -> insert('end', "System Ready\n\n"); $SA -> configure( -text => 'Log off'); }

In reply to Updating a TK window during a sub by JBarsky

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.