in reply to Re^2: How do you exit PERL TK menu without exiting the script too ?
in thread How do you exit PERL TK menu without exiting the script too ?
Have Submit set a "success" flag, destroy the main window, then return. Complete the processing in the main line following MainLoop if the success flag is set:
... my $ok = 0; MainLoop; print "Script continues after mainloop terminated\n"; print "Do ok stuff\n" if $ok; sub Submit { $ok = 1; $main->destroy; }
Update: added code example
|
|---|