In my Perl code, I use a system command to run a script. I'm using Gtk2::Perl and Glade to build a UI. I need the output of the command to be captured not just to the console (which Capture::Tiny does), but also to a TextView in my GUI.
system("command");
$stdout = tee{ #This captures the output to the console
system("command");
};
$textbuffer->set_text($stdout); #This does set the TextView with the captured output, but *after* the capture is over.
Any help would be greatly appreciated.
systemto be captured in the TextView simultaneously with its capture on the console. That's not happening.