That worked. Also, changing the code to this works:
if (/^\s*(\S+)\s+(\S+)\s+(.+\S)\s*$/) {
my $x = $3;
$dbh->do('replace into reference_code values (?,?,?)',undef,$1,$
+2,$3) or die "[$1] [$2] [$3] [". $dbh->errstr ."]";
How freaky is that? Notice 1,2,and 3 in the do call are unchanged. Take out the "my" line, instant error (and the db is unchanged). Leave it in, the program runs and the table is updated accordingly.
| [reply] [d/l] |