$EntryQuery->idletasks;#$EntryQuery is the Tk widget where the user is typing $SearchField->bind("", sub { print "Searching for $QueryInput\n";#$QueryInput is a variable linked with the Entry widget my $ResultsFinal=QueryDatabase($QueryInput); DeleteAllRowsInTable(); PrintingResultsInTable($ResultsFinal); });