in reply to Is there a more efficient way?

A first step is to move the prepare() calls out of the loop, and reuse the statement handler they return.

Replies are listed 'Best First'.
Re^2: Is there a more efficient way?
by lomSpace (Scribe) on Jul 29, 2009 at 21:12 UTC
    I tested this on a dir with 3 files and it is not inserting the
    data into the table fields. The tables are related via the $id(pk in blocks and fk in vials).<br Please excuse the previous typo.
      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.

      The code you have posted above is identical to the code you posted first? Maybe its a mistake on my part.