# $dbh has already been ->connect()ed my $sth = $dbh->prepare( "SELECT name, adres, woonplaats FROM personen" ); $sth ->execute(); # For each row in the result set, print it out. while( my( $name, $adres, $woonplaats ) = $sth->fetchrow_array ) { print "$name t $adres t $woonplaats"; }