$f_dialog->Label (-text => 'Search Query')->pack(-side=>'left'); my $e_search =$f_dialog->Entry (-textvariable => \$tv_search_command,)->pack(-side=>'left'); $e_search->bind("", sub {enter_pressed();} ); ...... sub enter_pressed() { #first few lines of this sub... $text->delete("1.0", 'end'); #Update 000ops this is for another window #not needed for entry window #I think text visible to user entry gets #cleared by the time we are here. #I do think making a copy of entered text for #further processing is good idea though... my $search_command = $tv_search_command; ....blah }