Filehandle and Widget printing.

2002-03-21 Thread Carter A. Thompson
I have a Perl/Tk script that executes a system command. What I'd like to do is capture the output from this system command and redirect it to both a filehandle and a text widget. print FH "some string\n";# This prints to the logfile $text->insert('end; "some string\n");

RE: Filehandle and Widget printing.

2002-03-21 Thread Scot Robnett
Don't use system, use backticks to get the output of the command. $foo = `cat foobar.txt`; print FH $foo; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Carter A. Thompson Sent: Thursday, March 21, 2002 1:39 PM To: Perl Users Subject: Filehandl

Re: Filehandle and Widget printing.

2002-03-21 Thread c. church
- Original Message - From: "Carter A. Thompson" <[EMAIL PROTECTED]> > print FH "some string\n";# This prints to the logfile > $text->insert('end; "some string\n");# This prints to the text widget > > system("cat foobar.txt"); > > Now, how to I get the output f