in reply to Error Handling/Debugging in Perl
Log::Agent and its related modules can be useful for debugging and error reporting. It can be combined with Log::Agent::Driver::File and Log::Agent::Rotate for easy file based debug/error/output messages logging.