http://www.perlmonks.org?node_id=492764


in reply to array as mysql db rows

Some ready to use solutions to your problem are available at DBI Recipes.

Check especially the section titled "Inserting a list of lists."