in reply to Returning Error Codes

Perl Best Practices recommends dying when you have an error. This prevents oversight by the caller (where they forget to test for the return code and go merrily on their way with flawed data in hand). This avoids downstream bug appearance which is harder to track. Then, you can say something like this:
eval { foo(); }; if ( $@ ) { # handle the error the error is in $@ }
Phil