in reply to Printing SQL query in Perl

Try with this 2 lines instead of the one you have, it may give you more info on what is happening.

my $sth = $dbh->prepare("select name,account from my_table where name= +?") || die $dbh->errstr; my $select_success = $sth->execute($name) || die $sth->errstr;