On Wed, 6 Feb 2002 [EMAIL PROTECTED] wrote:
> I understand how the system command works. I understand the
> difference between system() and backticks. My question is this:
> I want to make a call to an external program and I want the output
> printed to the command line as it is processing, BUT
I usually do not use system or command ticks.
I always pipe the output to STDOUT if I wish to manipulate the output of
any system
command. Alternatively, you could redirect output to a TEMP file, then
read from that file,
but "piping" is more efficient.
open MY_STDOUT, "{system command} | "
On Wed, 6 Feb 2002 [EMAIL PROTECTED] wrote:
> I understand how the system command works. I understand the
> difference between system() and backticks. My question is this:
> I want to make a call to an external program and I want the output
> printed to the command line as it is processing, BUT
use :
$| =1;
open(COMMAND, " command | ");
while(){
print STDOUT;
## do whatever you want with $_
}
close COMMAND;
__END__
you can then read the output and print it and whatever.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesda