format_c@elvis ~ $ mysql -Dtest -utestuser -ppassword Welcome to the MySQL monitor. Commands end with; or \g. Your MySQL connection id is 6 to server version: 3.23.49-max-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select * from config; +-------------+--------------+ | config_name | config_value | +-------------+--------------+ | schlüssel1 | wert1 | | schlüssel2 | wert2 | | schlüssel3 | wert3 | | schlüssel4 | wert4 | +-------------+--------------+ 4 rows in set (0.00 sec) mysql> \q Bye format_c@elvis ~ $ perl use strict; use DBI; use Data::Dumper; my %config = (); my $dbh = DBI->connect('DBI:mysql:database=test','testuser','password') or die DBI::errstr(); my $sth = $dbh->prepare('SELECT * FROM config') or die $dbh->errstr(); $sth->execute() or die $dbh->errstr(); while (my ($key,$value) = $sth->fetchrow_array()) { $config{$key} = $value; } print Dumper(\%config); _ _ END _ _ $VAR1 = { 'schlüssel3' => 'wert3', 'schlüssel1' => 'wert1', 'schlüssel2' => 'wert2', 'schlüssel4' => 'wert4' }; format_c@elvis ~ $