in reply to Re: Getting return code to shell
in thread Getting return code to shell

or even:

use constant { PASSED => 0, FAILED => 1, ABORTED => 2, }; # then use: exit PASSED; exit FAILED; #etc