in reply to Evaluate success or failure of a subroutine
If you change exit 6; to die 6, you can call your sub with
That is perl's version of exception handling for errors.my $result = eval { verifyRecCount($foo, $bar, $baz) }; doSomethingElse() if $@;
The other model is to return undef on error. Then defined can be used on the result to test for success.
After Compline,
Zaxo
|
|---|