in reply to Tk Mainloop - no exit.
Here's a few things you can do:
Change the -command to sub { exit } - you don't need to explicitly call destructors.
Remove the print and exit lines after Mainloop. You should normally only have subroutines, POD, DATA blocks, etc. after MainLoop - not statements such as these.
Call your subs like sub(); not ⊂ - see perlsub.
Add use strict; and use warnings; to the top of your code - act on the various messages these report.
Take a look at the widget demo for examples of writing Perl/Tk code.
-- Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tk Mainloop - no exit.
by Laotsu (Initiate) on Nov 09, 2010 at 04:46 UTC |