>
Code:
> use strict;
> use IPC::Run3;
> my ($stdout, $stderr);
> my @app = ('c:/program files/foo/flarp.exe', 'status', *'quux');
> run3(\@app, \undef, \$stdout, \$stderr);
> if ( $? == 0 ) { print "yay"; }
>
i tried running this code. for some obscure reasons it was showing
unexpected results when using command as array, it wasn't executing
the program in background at all, so i did
my $app = q[ c:/program files/foo/flarp.exe status quux ];
and it started executing but there came another problem. the return
value ($?) was always 0 now. i tried the same code with other
commands and it was working just not for this particular program.
before i give up i want to thank you for making me aware of
IPC::Run3. plus i learnt that there exists a File::Spec->devnull() to
redirect $stdout and $stderr messages to.
many thanks.