in reply to Array of Hashes population

You're doing this the difficult way. Use DBD::CSV, at the least that makes all of the methods in the DBI available to you.
$hash_ref = $dbh->selectall_hashref($statement, $key_field); $hash_ref = $dbh->selectall_hashref($statement, $key_field, \%attr); $hash_ref = $dbh->selectall_hashref($statement, $key_field, \%attr, +@bind_values);
The $key_field parameter defines which column, or columns, are used as keys in the returned hash. It can either be the name of a single field, or a reference to an array containing multiple field names. Using multiple names yields a tree of nested hashes.
Of course, with this method you have to know how to write a select statement... update
If you're looking for an AoH, just my @rows; push @rows, $_ while $sth->fetchrow_hashref


Evan Carroll
I hack for the ladies.
www.EvanCarroll.com