use Tk; # TK Setup #Window Creation $main = MainWindow -> new(); #Create Main Window Object $main -> minsize(qw(500 250)); #Size window $main -> configure(-background => 'blue');#Set Background Color #add go button $button_1 = $main -> Button(-text => "GO", -padx => 25, -foreground => "white", -background => "green", -command => \&go)-> pack(-side => 'bottom', -anchor => 's', expand => 'yes'); #Add main center frame $left_3 = $main -> Frame(-relief => 'groove', -borderwidth => 3, -background => 'blue')-> pack(-side => 'bottom',-anchor => 'n', -fill => 'x'); #added buttons to the frames (removed for this) #add label to center frame $label_3 = $left_3 -> Label(-text => "Status", -background => 'blue', -relief => 'raised', -borderwidth => 3, -foreground => 'white')->pack(-fill => 'x', -anchor => 'w', expand => 1); $text = $left_3->Label(-textvariable => \$var)->pack(-anchor => ‘w’); MainLoop(); sub go { #freeze the selections for $i (1..6){$check_button[$i] -> configure(-state => 'disabled');} # get info from dictionary files while(($folder, $drive) = each %search_locations) { #get list of files in directory $var = "Looking in - $drive/DICT/SOURCE\n"; chdir "$drive/variable/DICT/SOURCE"; @file_list = glob ("*.dsf"); $var = “Num of files: $#file_list”; } }