in reply to Re: autoclose a Perl-Tk window after 2 seconds.
in thread autoclose a Perl-Tk window after 2 seconds.

shmem's answer is exactly correct.

However, because I've encountered this at various times, I'd like to share another point that sooner or later might be useful to whomever.

When you simply want the MainLoop to finish, and continue executing code after it, you don't want to exit, but instead kill the MainWindow:

$mw->after(2000, sub { $mw->destroy }); MainLoop; warn "MainLoop ended; continuing...\n";
A word spoken in Mind will reach its own level, in the objective world, by its own weight

Replies are listed 'Best First'.
Re^3: autoclose a Perl-Tk window after 2 seconds.
by shobhit (Sexton) on Apr 13, 2007 at 17:35 UTC
    Thanks everyone for their collective wisdom in solving my problem.