Guest User

Untitled

a guest
Jan 21st, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. use strict;
  2. use warnings;
  3. use DBI;
  4.  
  5. my $dbh = DBI->connect("DBI:mysql:database=test;host=192.168.10.101",
  6. "test", "123456", {'RaiseError' => 1});
  7.  
  8. eval { $dbh->do("DROP TABLE foo") }; # foo table not exist
  9. if ($@) {
  10. print "Dropping foo failed: $@n";
  11. } else {
  12. print "okn";
  13. }
Add Comment
Please, Sign In to add comment