Posted on 2006-02-24 20:14:04-08 by jdhedden in response to 1849
Re: How to Control Exit Values?
    I notice that the exit value is 0

This doesn't make sense. Exception::Class exits using die(). This results in a non-zero exit status, usually 255. (I tested this to be sure.)

To set your own exit status, you can set a __DIE__ handler and supply exit() with whatever value you want:
$SIG{__DIE__} = sub { print(STDERR @_); exit(99); };
Direct Responses: 1852 | 1870 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.