in reply to declaring arrays dynamically

Have a look at the DBI-docs for the fetchall_arrayref function.

$tbl_ary_ref = $sth->fetchall_arrayref; returns a reference to an array each element of which is a reference to an array containing the data for each field in this row.

You can traverse this structure, so as to emulate your "1 array per field" requirement:

foreach (@$tbl_ary_ref) { print "@$_[1]\n"; # print the values of the second field in the da +tabase }

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law