use Tk; #================================================ # Main-Window #================================================ $HF = new MainWindow (-title => "Main-Window"); $HF->geometry('100x100'); #================================================== # Buttons #================================================== $BtnStart = $HF->Button ( -text=>"START", -command => \&ext, -borderwidth => 2, -relief => raised, )->pack(); $BtnStop = $HF->Button ( -text=>"STOP ", -command => sub{close (FH);$HF->update();}, )->pack(); #================================================ # Tk-End #================================================ MainLoop(); #================================================ # SUB-Programs #================================================ sub ext { #xxxx Pipe to the external programm open(FH, "c:\\extern.exe |"); while($tp=) { print "\n$tp"; $HF->update(); } }