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}.
In reply to Re: Obtaining field names only
by Animator
in thread Obtaining field names only
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |