How do I kill the window without killing the program? See sub ok below.
Thanks.
use strict; use warnings; use Tk; my $notified = 0; notify(); continue_processing(); exit 0; sub notify { my $win = new MainWindow; $win->Label(-text => 'Window!')->pack; $win->Button(-text => 'OK', -command => sub{ok()})->pack; Tk::MainLoop(); } sub ok { $notified = 1; Tk::exit(0); } sub continue_processing() { print "Here I am $notified\n"; }
In reply to Tk question by monktim
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |