use Tk; use Tk::widgets qw(Text); my $mw = MainWindow->new; $mw->geometry("+10+10"); #my $font = 'Times'; my $font = 'fixed'; my $t = $mw->Scrolled(Text => -font => [$font => 24, 'normal'])->pack( -fill => 'both', -expand => 1); $file = "t/JP.dat"; open(my $fh,"<:utf8",$file) || die "Cannot open $file:$!"; while (<$fh>) { # s/[^ -~\s]/?/g; $t->insert('end',$_); $t->see('end'); $mw->update; } close($fh); MainLoop;