http://qs321.pair.com?node_id=308284


in reply to write to cmd and save output

Update:Doh.. I missed the interactively part..

If you mean run an executable and capture the output, there are several ways to do this.

$result = `mycmd.exe -param1 -param2`;

or you could look at win32::process but you would have to do some clever STDOUT redirection. Some links to follow..

  • Win32 Process Output
  • Re: Capturing error messages from Win32::Process
  • -----
    Of all the things I've lost in my life, its my mind I miss the most.

    Replies are listed 'Best First'.
    Re: Re: write to cmd and save output
    by aquarium (Curate) on Nov 19, 2003 at 13:24 UTC
      expect module is what you want
        except that it's not (it doesn't work on win32)
          you better tell activestate that it doesn't work. according to them it does. the module's doc url is http://aspn.activestate.com/ASPN/CodeDoc/Expect/Expect.html