On Sun, 15 Oct 2006, yong wrote:

>
> Thank you very much.
>
> Now I can use STDOUT.reopen to redirect STDOUT output to a file.But How can I redirect it to a string?
>
> Thanks.

use backticks:

   string = ` your_cmd.exe `

substitution works like double quotes

   cmd = "your_cmd.exe"
   string = ` #{ cmd } `

-a
-- 
my religion is very simple.  my religion is kindness. -- the dalai lama