in reply to using IPC::Run

IPC::Run runs commands on the command line, feeds them (like Expect) lines on stdin and fetches the output of the program.

The first parameter of your start call (in your case @cat) should contain the program you wish to call. If you don't give IPC::Run anything to run, it naturally sees no sense in running.

If you give it a program to run that uses a GUI instead of a command line (don't know, but Edit sounds like it might use a GUI) it also might have problems running

"Process ended prematurely" probably means the program you called (i.e. Edit) stopped running before it could receive any of the input you provided.

Replies are listed 'Best First'.
Re^2: using IPC::Run
by Anonymous Monk on Jul 29, 2008 at 14:18 UTC
Re^2: using IPC::Run
by perlseeker19 (Novice) on Jul 30, 2008 at 06:39 UTC

    hi jethro,

    thank you for your valuable idea.my requirement is to run a command prompt.go to a particular directory and run a command.

    during execution of this command i wait for a particular string to occur. the moment it occurs i will have to open a com port.the comport part is ready

    now that i have changed @cat = qw(cmd). i get

    "IPC::Run: timeout on timer #1 at C:/Perl/site/lib/IPC/Run.pm line 2932

    please help me out