http://www.perlmonks.org?node_id=1100999

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

We recently upgraded perl from 5.8 to 5.10

we discovered after the upgrade that the fetchrow_array loop ends abruptly

code snippet:
my $searchSQL = $dbh->prepare($sql1);
my $insertSQL = $dbh->prepare($sql2);


$searchSQL->execute();
while (my ($id,$name) = $searchSQL->fetchrow_array()) {
$insertSQL->execute($id,$name);
$insertSQL->finish;
}


if I comment out the "$insertSQL->execute($id,$name);" it loops thru all the records.

the code perfectly works in 5.8 but not in 5.10

any ideas?

Thanks