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.
Conway's Game of Life
Perl regular expressions
My Magic 8-Ball™
Results (192 votes). Check out past polls.