RE: Redirecting STDOUT to a variable...

2001-11-29 Thread Ajmera_Mayank
Ya that is right but I want to avoid the whole file thing. I have to do this very often in some testing scripts and it slows down the whole test a great deal. So I am looking for an alternative to it. Thanks Mayank -Original Message- From: Brett W. McCoy [mailto:[EMAIL PROTECTED]] Sent:

RE: Redirecting STDOUT to a variable...

2001-11-28 Thread Ajmera_Mayank
Hi Thanks, but I need to preserve the value returned by $mycommand also. I guess using backticks won't allow me to do that . Mostly what I need to do is read from STDOUT into a variable. But I don't know how to do that. Mayank -Original Message- From: Brett W. McCoy [mailto:[EMAIL PROTECT

RE: Redirecting STDOUT to a variable...

2001-11-28 Thread Ajmera_Mayank
Hi, Thanks -Original Message- From: Brett W. McCoy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 28, 2001 11:56 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Redirecting STDOUT to a variable... On Wed, 28 Nov 2001 [EMAIL PROTECTED] wrote: > I am looking to run a co

Redirecting STDOUT to a variable...

2001-11-28 Thread Ajmera_Mayank
Hi, I am looking to run a command using perl and get its return value as well as its STDOUT. Currently I am doing is $result = system("$myCommand >out.txt"); open(FILE,"< out.txt"); and then processing the data from the file. This is terribly slow for my application. Is there some way where I c