A
alfonsobaldaserra
hello,
i am calling an external command in perl on win32 as follows
my $app = 'c:\program files\foo\flarp.exe status quux';
my $spam = qx/ $app 2>&1 /;
now i need to get the status of executed command
if ( $? == 0 ) { print "yay"; }
the problem is it always returns 0. since quux is not running, when i
run the same command on cmd.exe i get return value as 3
i have checked the archives with similar question but no help. i have
also checked system() and qx// documentation but they don't have
anything like this.
is there any other way to do this?
thanks.
i am calling an external command in perl on win32 as follows
my $app = 'c:\program files\foo\flarp.exe status quux';
my $spam = qx/ $app 2>&1 /;
now i need to get the status of executed command
if ( $? == 0 ) { print "yay"; }
the problem is it always returns 0. since quux is not running, when i
run the same command on cmd.exe i get return value as 3
3echo %ERRORLEVEL%
i have checked the archives with similar question but no help. i have
also checked system() and qx// documentation but they don't have
anything like this.
is there any other way to do this?
thanks.