DBI: raiseerror in eval
问题 This question refers to this comment from Ikegami: [...] But if you're going to put an eval around every statement, just use RaiseError => 0. [...] in this thread. What do I gain, if I set RaiseError to 0 in such situations? #!/usr/bin/env perl use warnings; use 5.10.1; use DBI; my $db = 'my_test_sqlite_db.sqlite'; open my $fh, '>', $db or die $!; close $fh or die $!; my ( $dbh, $sth ); eval { $dbh = DBI->connect( "DBI:SQLite:dbname=$db", "", "", {} ); }; if ( $@ ) { print $@ }; my $table =