this should do it....perhaps someone can come up with a one liner

->cut
use IPC::Open3;

$CMD=join " ",@{ARGV[0..$#ARGV-1]}; #build up command

open3( local $TMP , \*RDRFH,local $TMP ,"$CMD"); #run it

open WR_FH, "> $ARGV[$#ARGV]" || die "could creat $ARGV[$#ARGV]: $!";
 
print WR_FH while <RDRFH> ;     #print output to a file


->paste
----- Original Message ----- 
From: "Sugumar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 19, 2002 2:46 PM
Subject: Redirecting Output


> Hi,
> 
> I'm trying this command from my perl program system ( "perldoc perldsc > 
> tmp.txt"). I don't see the output going to the file tmp.txt; instead it 
> shows the output
> in the screen.How could I get the output in some text file.
> 
> Sugumar
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to