my $stmt = "SELECT schema_name FROM information_schema.schemata ORDER BY schema_name"; my $databases = $dbh->selectcol_arrayref( $stmt, {}, () );