in reply to Perl/Tk window contents disappear when obscured then revealed
This may be close to what you are trying to do:
use strict; use warnings; use Tk; my $mw = MainWindow -> new; my $m = $mw -> Message (-text => "testing, one, two, three...") -> pac +k; my $n = 0; $mw->repeat( 1000, sub{ $mw->destroy if ++$n == 10; print "$n\n"; } ); MainLoop; print "Done\n"; __END__ C:\test>\perl32\bin\perl junk91.pl 1 2 3 4 5 6 7 8 9 10 Done
|
|---|