Using perl 5.28 and mysql on windows. Question: Can DBI give me a field from the record on the main table causing the duplicate so I can add that to the record going to the duplicate table?
It might be preferable to do this directly in SQL, using triggers. See here for a similar question:
https://stackoverflow.com/questions/18620389/before-insert-trigger-for-insert-duplicate-rows-into-another-table -- Mark Lawrence