http://qs321.pair.com?node_id=469671


in reply to Re^5: Perl and DBI and CGI
in thread Perl and DBI and CGI

Code Master,
I couldn't believe what is happening that the same script gives different results on different machines, finally I add the following code to your script:
my $ref = $dbh->selectall_arrayref(" select name, email from users") || die $dbh->errstr; foreach my $person (@{$ref}) { my ($name,$emai) = @{$person}; $_=$Name; s/ /_/g; $Name=$_; print "<font color=\"red\" >Name : $name </font>"; print "<font color=\"blue\"> Email : $email </font><br>"; }

Surprisingly, the result is:
Name : Dr._John_Bull Email :

So, it is not DB error, but something else. Do you have any idea how to improve it?
I can live with the "_" insted the " " but Perl beauty suffers.
Best regards,
sOKOle