Dear Nilay, I strongly recommend using exceptions (what you call "try-catch"), since you need to do something more complicated upon failure.
You can implement exceptions using eval, die and checking the return value of eval. This is a rather ugly way to implement exceptions, but commonly used. A better way is to use the Error module. perldoc Error Sidenote: Consider transactions if your DB supports them, depending on what you are doing. Jonathan Paton -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>