in reply to Re^2: Is there a more efficient way?
in thread Is there a more efficient way?

What do you want to tell me with the code you pasted? It still has the ->prepare statements inside the loop, and at a casual glance I see no difference to what you posted originally. What did you change?
I tested this on a dir with 3 files and it is not inserting the data into the table fields.

Was it working in your original version? At least I didn't read anything about any failures.

Anyway, you should set the RaiseError option on connecting to the database, see the DBI documentation.