my $up = qq{ UPDATE Prior_to_CI_calc_A_.$region SET SUM_wi = ?, Sum_wixi_x_1000 = ?, Sum_wi2xi_x_1000 = ? WHERE A.Aggregated_area LIKE ? AND A.Cause LIKE ? }; ### Do print here to see what $up contains ### print STDERR "\$up=$up\n"; my $sth = $dbh->prepare($up); $sth->execute($SUM_Weight_wi, $SUM_wixi_x_1000, $SUM_wi2xi_x_1000_fill, $Aggregated_area_fill, $Cause_fill); #### perldoc DBI