in reply to Re: execute a file, then send terminate command?
in thread execute a file, then send terminate command?

I think your on to something, but the \e didnt press the escape key. So now the question is, how do you send an escape key to stdin ?.......
  • Comment on Re^2: execute a file, then send terminate command?

Replies are listed 'Best First'.
Re^3: execute a file, then send terminate command?
by BrowserUk (Patriarch) on Feb 04, 2012 at 23:50 UTC

    You'll need to ensure that the output buffer gets flushed. Try:

    use IO::Handle; open SYS,"| windows_exe_file.exe" or die ...; SYS->autoflush(1); print SYS "EXPORT this and that to thisFile.dat"; print SYS "\e"; close SYS; my @data = do{ open IN, 'thisFile,dat'; local $/; <IN> };

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?