Basically, I'm querying a database and I need to convert the resultant array to a hash.
I query the database as follows
my $sth = $dbw->prepare($sql);
while (@rows = $sth->fetchrow_array()) {
...
...
}
Now, I need to create a hash such that rows[0] is the key and rows[1],rows[2],rows[3] are the values. For each record read, a new hash key has to be generated and the corresponding values set
If my tables look like
abc 2.3 2.4 2.5
def 3.2 3.3 3.4
ijk 4.5 4.6 4.7
First record is read and abc is the key and the numbers are the values...so on