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


in reply to array from query to db

Besides the DBI documentation, have a look at DBI Recipes. What you need, and much more, is already there.