#!/usr/bin/perl use strict; use warnings; use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); use DBI; #use HTML::Table; use Data::Dumper; print header('text/plain'),start_html(); my $dbh = DBI->connect("DBI:CSV:f_dir=f:/Apache2/cgi-bin/") or die "Konnte Datenbank nicht oeffnen! $!"; my $stmt = "SELECT * FROM Kunden"; my $sth = $dbh->prepare($stmt) or die $dbh->errstr; $sth->execute() or die $dbh->errstr; #my $table2 = new HTML::Table; #$table2->addRow('DHL','K_N','Hellmann'); my @results; while(my @cell_values = $sth->fetchrow_array()){ # $table2->addRow(@cell_values); push @results,[@cell_values]; } print Dumper(\@results); #$table2->print; $dbh->disconnect;