#!/usr/bin/perl use CGI::Carp('fatalsToBrowser'); use CGI qw(:all); use DBI; print header; $dbh = DBI->connect("DBI:mysql:testjvd:localhost","root","mysqljvd",{ PrintError => 0}) || die $DBI::errstr; $sth=$dbh->prepare("SELECT * FROM gebr"); $sth->execute(); while ( @ columns = $sth->fetchrow ) { print ( ( map { "$_ " } @columns ) , "\n") ; } $sth->finish(); $dbh->disconnect; exit;