On 2012-04-08 17:10, Vyacheslav wrote:

using eval helped me.

You should not use exceptions for normal code flow.

Read the DBI docs (perldoc DBI).
If a failed connection must be an exception, set RaiseError to true.
But if it isn't an exception, leave it false, and test $dbh->err (or the global $DBI::err).

--
Ruud

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to