I am really sorry that it is not working for you. Actually, I created a temptable and tried executing the code that you are using;
my $ref = $dbh->selectall_arrayref("
select name, email from testtable") || die $dbh->errstr;
foreach my $person (@{$ref}) {
my ($name,$emai) = @{$person};
print "<font color=\"red\" >Name : $name </font>";
print "<font color=\"blue\"> Email : $email </font><br>";
+
}
It runs just fine even with the "Dr. John Bull". Please check the database if some special characters are not slipped thru.
here is the output
Name : Dr. John Bull Email :