|Rufus T. Firefly
||12-13-2006 01:26 PM
PerlTK - save console in file
I'm running perl 5.8.8 on Fedora Core 5.
My program is perlTK that allows the user to select an input file (text) and then it kicks off a series of 'C' programs that translate the input file to what is called 'ARPA' format. The program runs just fine but now I need to add some additional functionality ...
While the 'C' progs are running, they splash some progress (or failure) lines to the perl console (Gnome Terminal). I would like to save these progress lines in a file either real-time as they are being created or by somekind of copy-paste operation from the console to a file.
So far I tried standard redirect (>), STDOUT/STDERR (1>&2) maneuvers, Tk-ExecuteCommand and some other approaches I found in the user groups forums ... all to no avail as they all give me the full outputs of the 'C' programs which I already have. All I need to capture is the console text.
To be honest, I'm not even sure if this is a Perl problem, A TK problem, Bash problem or whatever.
Any help would be appreciated.