#!/usr/bin/perl -w use Tk; use Tk::DialogBox; use strict; my($main,$Edit); $main=MainWindow->new(-title => 'MyTestProg'); #Creating window with title $main->Label(-text => 'Enter your action')->pack; $Edit=$main->Entry(-width => 20)->pack;#input field $main->Button(-text => 'Test', -command => \&process)->pack(-side => 'left'); #Button Called 'Test' which calls the subroutine $main->Button(-text => 'Exit', -command => [$main => 'destroy'] #button for closing windwo )->pack; MainLoop; #### ... $InfoWindow->add("Label", -text => "Output: $output")->pack; ... $InfoWindow->Show(); $InfoWindow->destroy;