in reply to Line size in a text widget

There is probably a way to keep track of the line length from the text widget's methods, but here is a brute approach.
#!/usr/bin/perl use Tk; use strict; my $mw=tkinit; my $textarea = $mw->Scrolled("Text", -scrollbars => 'ose', -width =>80, -wrap =>'word', )->pack; $mw->after(1000,\&filltext); MainLoop; sub filltext { my $length = 0; for (1..200){ if($length > 30){$textarea->insert('end', "\n");; $length = 0} $textarea->insert('end', "$_ "); $length += length("$_ "); $textarea->see('end'); $textarea->idletasks; $mw->after(10); } }

I'm not really a human, but I play one on earth. flash japh