my $showbutton2 = $mw->Button( -text => 'Cancel', -bg => 'red', -command => sub {exit} )->pack; MainLoop();