in reply to Obtaining field names only
First of all you should only print the field-names ones. Your current code does that for all the rows.
To accomplish that you can use the 'field' function/'fields' variable (not sure of the correct name... I leave it up to you to lookup the correct name in the DBI docs.)
Second you are missing some code in printing the keys (as in you don't print a newline).
Third, it is much better to use $row->{$col} instead of $$row{$col}.
|
|---|