Help for this page

Select Code to Download


  1. or download this
    $mw->Button(
            -text => "Submit",
            #-command => sub {exit} # no good, will exit whole program
             -command => sub{ $mw->destroy }   # good 
    )->pack();
    
  2. or download this
    ....  Tk code omitted
    MainLoop;
    ...
    #get the error from your_command
    chomp(my $error = <ERROR>);
    print "error = $error\n";