#!/usr/bin/perl use strict; use warnings; use DBI; use Config::Auto; my $config = Config::Auto::parse('main.config'); my $dsn = $config->{dsn}; my $username = $config->{username}; my $password = $config->{password}; my $options = { AutoCommit => 1, }; my $dbh = DBI->connect($dsn, $username, $password, $options) or die "cannot connect to db: " . DBI::errstr(); # mach was mit $dbh $dbh->disconnect();