hank1
asked on
array of hashes
Have a hash (from ODBC $db->DataHash) and
want to place it into an array of hashes. How?
while ($db->FetchRow()) {
undef %Data;
%Data = $db->DataHash();
# concept push @a, %Data; # Yes, I know this doesn't come close.
}
Do I have to break up %Data into its key/value pair and
push @a, {key1 => value, key2 => value}
or is there a better way?
Thanks
want to place it into an array of hashes. How?
while ($db->FetchRow()) {
undef %Data;
%Data = $db->DataHash();
# concept push @a, %Data; # Yes, I know this doesn't come close.
}
Do I have to break up %Data into its key/value pair and
push @a, {key1 => value, key2 => value}
or is there a better way?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry guys.