in reply to Errors in Code
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$COMNTS=~s/\'/''/g; $ADR_L1=~s/\'/''/g; $ADR_L2=~s/\'/''/g; $ADR_L3=~s/\'/''/g;
foreach (qw(CLIENT RECORD CONTROL ...)) { $hash{$_} =$data[$idx++]; }
In Section
Seekers of Perl Wisdom