my $top = MainWindow->new(); my $next = $top->DialogBox(-title=>"Qconnect", -buttons=> ["OK", "Cancel"], -default_button=>"OK"); my $next2 = $next->add ('Label', -text=>"Enter agent ID:")->pack(-side=>'left'); my $next3 = $next->add ('Entry', -textvariable=>\$port, -width=>8)->pack; $next->Show; $top->destroy; MainLoop();