D
Dilbert
I have the following perl program to test return codes (I am running
Strawberry Perl 5.12 under Windows Vista 64 bits):
===============
use 5.012;
use warnings;
say 'Start';
system qq{perl -e"exit -1"};
say 'Stop';
===============
Here is the output:
===============
Start
Can't spawn "perl -e"exit -1"": No error at C:\test.pl line 5.
Stop
===============
The program as such runs ok, but the problem is the warning messageat all. I want to have warnings on in general, but this particular
warning is not desired. Why should there be a warning at all if the
return code is negative ? -- If I run the same program with "...exit
1;..." then everything is ok, i.e. no warning is emitted.
In the real world scenario, I have an *.exe file that occasionally
emits negative return codes, in which case a >>Can't spawn...No
error<< warning message is emitted. I can't change the behaviour of
the *.exe file. How can I get rid of this particular warning message ?
-- I could say no warnings in the lexical scope of the system command,
but I find this message is completely useless.
I wonder what my fellow perl programmers think about this warning
message.
Strawberry Perl 5.12 under Windows Vista 64 bits):
===============
use 5.012;
use warnings;
say 'Start';
system qq{perl -e"exit -1"};
say 'Stop';
===============
Here is the output:
===============
Start
Can't spawn "perl -e"exit -1"": No error at C:\test.pl line 5.
Stop
===============
The program as such runs ok, but the problem is the warning messageat all. I want to have warnings on in general, but this particular
warning is not desired. Why should there be a warning at all if the
return code is negative ? -- If I run the same program with "...exit
1;..." then everything is ok, i.e. no warning is emitted.
In the real world scenario, I have an *.exe file that occasionally
emits negative return codes, in which case a >>Can't spawn...No
error<< warning message is emitted. I can't change the behaviour of
the *.exe file. How can I get rid of this particular warning message ?
-- I could say no warnings in the lexical scope of the system command,
but I find this message is completely useless.
I wonder what my fellow perl programmers think about this warning
message.