$mw->iconify; $mw->withdraw; unless(open(HND,"; chomp $line; close HND; system($line.'vmapper.exe'); #other program exited, continue from here $mw->raise; $mw->deiconify; $mw->update; $mw->focus; #should give the focus back here