use Tk; my $mw = MainWindow->new; my $toplevel = $mw->Toplevel; $toplevel->transient($mw); MainLoop;