http://www.perlmonks.org?node_id=917760

puneet.keswani has asked for the wisdom of the Perl Monks concerning the following question:

Hi.. I am stuck from quite some days now.. Here s the scenario I have a main perl script and a self designed perl module called common.pm, in the module I have writen 3 subroutenes, 1st to connect to Sybase, 2nd calling a sybase proc with parameters and 3rd disconnecting from Sybase.. in my main perl script I am using this module with the help of ; use common.pm From the main perl script I am calling the subroutenes to connect to database.. &common::sybaseconnection(parameters) Now my problem is that I want to capture the error message thrown by a database say when the password has expired and the connection cannot be made in the perl script so that I can log that message in a log file. The errors thrown by the databse can be seen as ouput on the screen but I am unable to capture those error meaasges in my main perl script.. These are simple error messages which database would throw incase it was supplied with wrong user id password. Please help !!