# Connect to MySQL with Mysql.pm
# connect() args: undef=localhost, DATABASE_NAME, username, password
use Mysql;
$dbh = Mysql->connect(undef, "bjepson", "bjepson", "secret");

# Create a statement handle (this executes it, as well)
$sth = $dbh->query("SELECT * FROM individual");

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

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

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

}