~ubuntu-branches/ubuntu/maverick/perl-tk/maverick

« back to all changes in this revision

Viewing changes to examples/tiehandle

  • Committer: Bazaar Package Importer
  • Author(s): Colin Tuckley
  • Date: 2010-05-30 09:19:40 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100530091940-wbmq9bloo92t9m6x
Tags: 1:804.029-1
* New Upstream Release (Closes: #578814).
* Added debian/watch file.

Show diffs side-by-side

added added

removed removed

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