http://qs321.pair.com?node_id=250718


in reply to Errors in Code

$COMNTS=~s/\'/''/g; $ADR_L1=~s/\'/''/g; $ADR_L2=~s/\'/''/g; $ADR_L3=~s/\'/''/g;
Original question aside (Enlil seems to be on track), why aren't you using DBI's quote methods? Also, maybe consider using a hash for all these fields, something like
foreach (qw(CLIENT RECORD CONTROL ...)) { $hash{$_} =$data[$idx++]; }