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");
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
- 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