my $out = `command`; $text->insert('end', $out); #### open OUT "command |" or die "Could not open command: $!\n"; while (my $line = ) { # process $line ... $text->insert('end', $line); }