#!/usr/bin/perl -w use strict; use Tk; my $mw = new MainWindow; my $rec1 = $mw->Canvas(-height => "90", -width => "500")->pack(); $rec1->createRectangle(1,1,500,90, -fill => "black"); my $txt_tag = $rec1->createText(250,45, -justify => "center", -fill => "yellow", -font => "times 50", ); open(FILE, "sip.txt"); while ( ) { push my @lines, [ split ]; for my $i ( 0 .. $#lines ) { for my $j ( 0 .. $#{$lines[$i]} ) { # $word = $lines[$i][$j]; $mw->after(200); print "$lines[$i][$j] "; $rec1->dchars($txt_tag,0); $rec1->insert($txt_tag,0,$lines[$i][$j]); } } } MainLoop;