#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::TextUndo; my $mw = MainWindow->new(); my $text = $mw->Scrolled('TextUndo')->pack; tie *STDOUT, ref($text->Subwidget('textundo')), $text; print "Hello, world.\n"; MainLoop;