1#!/usr/local/bin/perl -w
2
3use Tk;
4
5my $mw = MainWindow->new;
6my $t  = $mw->Scrolled('Text');
7$t->pack(-expand => 1, -fill => 'both');
8
9tie *TEXT,Tk::Text,$t->Subwidget('text');
10
11print TEXT "Hi there\n";
12
13seek(DATA,0,0);
14while (<DATA>)
15 {
16  print TEXT;
17 }
18
19MainLoop;
20
21__DATA__
22
23
24