i've got it working with the following... :-). i've moved the prepare outside the foreach for speed purposes.
... my $resSet8 = $sth8->fetchall_arrayref; $sth8->finish(); my $sth9 = $dbh->prepare("UPDATE $dbtable2 SET TEST1=?,TEST2=? WHERE TEST3=?"); foreach my $res8Item ( @{ $resSet8 } ) { my $var0 = $res8Item->[0]; ..... my $rv9=$sth9->execute($var0,$var1,$var3); } $sth9->finish(); Alex