in reply to Processing STDOUT of a called perl script during execution

You need to use fileevent with Tk to read filehandles. (On win32, fileevent only works on sockets). There are many other complexities that can set in, but this is the basic.
#!/usr/bin/perl use warnings; use strict; use Tk; $|=1; open( T,"top -d 1 -b & |"); my $mw = new MainWindow; my $t = $mw->Scrolled("Text",-width => 80, -height => 25, -wrap => 'no +ne'); $t->pack(-expand => 1); $mw->fileevent(\*T, 'readable', [\&fill_text_widget,$t]); MainLoop; sub fill_text_widget { my($widget) = @_; my $text = <T>; $widget->insert('end',$text); $widget->yview('end'); }

I'm not really a human, but I play one on earth. Cogito ergo sum a bum