#!/usr/bin/perl -w use DBI; use strict; # set up info to connect to db my $data_source="dbi:mysql: ;host=bioed"; my $user=" "; my $password=" "; # connect my $dbh = DBI->connect($data_source, $user, $password) or die "Can't connect to $data_source: $DBI::errstr"; # prepare a select statement for execution my $sth = $dbh->prepare( q{ }) or die "Can't prepare statement: $DBI::errstr"; # execute the statement my $rc = $sth->execute or die "Can't execute statement: $DBI::errstr"; # create local variables for receiving the data my ( ); #print a header for the output printf ( ); # loop through rows of data and print them while ( = $sth->fetchrow_array) { printf ( ); } # check for problems which may have terminated the fetch early die $sth->errstr if $sth->err; # disconnect from database $dbh->disconnect;