in reply to Processing STDOUT of a called perl script during execution
Then your problem becomes comprehensible: run alone, this test3 produces five lines of text 1 second apart, but run from test.pl (the Tk) you wait five seconds and then see the five lines.#!/usr/bin/perl -w # the new test3.pl use strict; $|=1; #NECESSARY print "Write something: \n"; my $it=1; until ($it == 5) { print "line $it...\n"; sleep 1; $it++ }
Now you can watch the five lines appear one at a time, the same way they would if they were logging a time-consuming process.$text_box -> insert ("end", $_); $main->update;
|
|---|