use Tk; $bottomFrame = MainWindow->new(); my $txt_summary = $bottomFrame->Scrolled( "Text", -background => 'blue', -foreground => 'white', -height => '1', -takefocus => '0', -width => '40', -scrollbars => 'oe', )->pack(qw(-fill both -expand 1)); open(FH, "cuentos.txt") || die "no Abrio nada"; sub display_text { if(eof(FH)) { $bottomFrame->afterCancel($bottomFrame->{RepeatID}); close (FH); $txt_summary -> Insert("\n== FIN ==",'end'); return; } else { chomp(my $line = ); $txt_summary -> Insert("\n$line",'end'); } $txt_summary->see('end'); } $bottomFrame->{RepeatID} = $bottomFrame->repeat(500, \&display_text); MainLoop; __END__