in reply to IPC::Open2 failures

Perhaps IPC::Open3? The same as 2, but with error handling.

*update* i'm affraid you're right, it doesn't seem to work like expected...
Using wrong arguments and command, it still returned a proper $pid. The $err remained empty....

Well, while i'm in hunchmode now anyway (i like to see this fixed), could IPC::Cmd help?

"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.

Replies are listed 'Best First'.
Re^2: IPC::Open2 failures
by El Linko (Beadle) on Apr 07, 2005 at 19:34 UTC
    IPC::Cmd seems to use either IPC::Open3 or IPC::Run
    The IPC::Run docs say -

    start() pauses the parent until the child executes the command or CODE reference and propagates any exceptions thrown (including exec() failure) back to the parent. This has several pleasant effects: any exceptions thrown in the child, including exec() failure, come flying out of start() or run() as though they had ocurred in the parent.

    This sounds like what I'm looking for. I'll try it tomorrow and see if lives up to its promises. I would still prefer to do this with a core module if possible and avoid any hassle getting modules installed.

    Edit by tye: Remove PRE tags around long lines

Re^2: IPC::Open2 failures
by El Linko (Beadle) on Apr 07, 2005 at 13:50 UTC
    I think that refers to the fact you can get STDERR using open3 but I'll give a looking at it.