January 1999
Beginner
373 pages
9h 43m
English
In all of the examples in this book you will see sub { exit; }used to quit the Perl/Tk application. This works fine as long as you have done a use Tk; in the same file that contains the sub { exit } . Perl/Tk defines its own exit routine which does some cleanup and various other things that are important to Tk. Another way to quit the Tk portion of the application is to call $mw->destroy(), which destroys the main window and returns to the code listed after MainLoop. The code after MainLoop will not be executed even if you use sub { exit }. Keep this in mind if you are going to be doing anything after the GUI portion is done.