#!/usr/bin/perl use strict; use warnings; use DBI; my $user = '*me*'; my $passwd = '*beep*'; my $db = 'mysql'; my $host = 'localhost'; my $driver = "DBI:mysql:$db:$host"; my $dbh = DBI->connect($driver,$user,$passwd) || die $DBI::errstr; my $statement = 'SELECT * from filme'; my $sth = $dbh->prepare($statement) || die $DBI::errstr; $sth->execute() || die $DBI::errstr; my @ergebnisse; while (my @row = $sth->fetchrow_array()) { push @ergebnisse, $_ for (@row); } print "$_\n" for (@ergebnisse); $dbh->disconnect();