#!/usr/bin/perl -- use strict; use warnings; use Tk; my $mw = tkinit(); $mw->Button( -text => 'go' , -command => sub { $mw->Busy; $mw->iconify; $mw->withdraw; system $^X, '-MTk', '-e', 'tkinit;MainLoop' ; $mw->raise; $mw->deiconify; $mw->update; $mw->focus; $mw->Unbusy; $mw->focus; $mw->focusForce; # win32 return; }, )->pack; MainLoop();