in reply to Re: Using SYSTEM2 on Windows
in thread Using SYSTEM2 on Windows

Sorry for the delay. Our solution was to just rip it out entirely instead of fighting with it. I've needed a solution like this for other applications, so I took a look at the code you suggested. IPC::Run3 does seem to work, but I couldn't figure out how to connect to it. There are no examples at all and no one seems to use it. I tried setting up pipes for it, but nothing is returned when I do that:
use IPC::Run3; use IO::Pipe; my $cmd = "cmd /D/C dir"; my $out = new IO::Pipe; $out->reader(); my $err = new IO::Pipe; $err->reader(); run3 $cmd, $out, $err; print "OUT: $out ERR: $err\n"; map {print "$_\n"}<$out>; map {print "$_\n"}<$err>;

Replies are listed 'Best First'.
Re^3: Using SYSTEM2 on Windows
by ikegami (Patriarch) on May 27, 2009 at 20:38 UTC
    use IPC::Run3 qw( run3 ); my $cmd = "cmd /D/C dir"; run3 $cmd, undef, \my @out, \my @err; print "STDOUT: $_" for @out; print "STDERR: $_" for @err;

    @out and @err can be scalars if you don't need the lines to be split

      Oh! I see now. Works perfectly! You guys amaze me by what you know. Thanks!