tie *STDOUT, Tk::Text, $text; # '$text' is a Text widgit.