# Connect to ODBC with DBI.
use DBI;
$dbh = DBI->connect("DBI:ODBC:BJEPSON_ACCESS");
if (!$dbh) {
 die "A DBI error occurred: " . $DBI::errstr;
}

# Create a statement handle with DBI.
$sth = $dbh->prepare("SELECT * FROM individual");

# Execute the statement (get a resultset).
$rv = $sth->execute();
if (!$rv) {
 die "A DBI error occurred: " . $DBI::errstr;
}

# Fetch each row in the result set.
while ($row = $sth->fetchrow_hashref) {

  $first_name    = $row->{first_name};
  $last_name     = $row->{last_name};
  $favorite_food = $row->{favorite_food};

  print "$first_name $last_name enjoys $favorite_food.\n";

}

# Clean up the DBI connection.
$sth->finish;
$dbh->disconnect;