in reply to Evaluate success or failure of a subroutine

If you change exit 6; to die 6, you can call your sub with

my $result = eval { verifyRecCount($foo, $bar, $baz) }; doSomethingElse() if $@;
That is perl's version of exception handling for errors.

The other model is to return undef on error. Then defined can be used on the result to test for success.

After Compline,
Zaxo