Почему нет строки "$ rc = $ dbh-> func ('dropdb', $ dbname, 'admin');" удалить базу данных db_test_2?
#!/usr/bin/perl
use warnings;
use strict;
use 5.010;
use DBI;
my $host = 'localhost';
my $user = 'user';
my $password = 'password';
my( $rc, $dbname, @databases );
my $drh = DBI->install_driver( 'mysql' );
$dbname = 'db_test_1';
# use a driver handle (drh)
$rc = $drh->func( 'createdb', $dbname, $host, $user, $password, 'admin' );
say for DBI->data_sources( $driver, { host => $host, user => $user, password => $password });
# DBI:mysql:information_schema
# DBI:mysql:db_test_1
# DBI:mysql:mysql
$rc = $drh->func( 'dropdb', $dbname, $host, $user, $password, 'admin' );
say for DBI->data_sources( $driver, { host => $host, user => $user, password => $password });
# DBI:mysql:information_schema
# DBI:mysql:mysql
my $dbh = DBI->connect( "DBI:mysql:", $user, $password, { RaiseError=>1, AutoCommit=>1 } );
$dbname = 'db_test_2';
# reuse the existing connection of a database handle (dbh)
$rc = $dbh->func( 'createdb', $dbname, 'admin' );
say for DBI->data_sources( $driver, { host => $host, user => $user, password => $password });
# DBI:mysql:information_schema
# DBI:mysql:db_test_2
# DBI:mysql:mysql
$rc = $dbh->func( 'dropdb', $dbname, 'admin' );
say for DBI->data_sources( $driver, { host => $host, user => $user, password => $password });
# DBI:mysql:information_schema
# DBI:mysql:db_test_2
# DBI:mysql:mysql