in reply to function or something

I'm not sure if you want your *program* to return a value, or you want the *subroutine* to return a value. If the program, do
someFunction() or exit(1);
If the function, you'll have to catch the value the sub returns and do your thing with it.
my $ret = someFunction(); if( $ret ){ do_your_thing(); maybe_return_here(); }
/me needs a new .sig