in reply to Perl - MySQL query question

The do command is only for queries that do not return a result.
Rather than giving you some of my examples, I can address you to jeffa's excellent tutorial on HTML::Template.
It tells you exactly how to do what you need using selectall_arrayref.

update (I hit the submit button instead of preview) :(
As for you last question, I am not sure I got it correctly, but to get all the values from a column you can use this (untested) paradigm:
my $column = "rent"; my $rows= dbh->selectall_arrayref(qq{SELECT DISTINCT $column FROM owne +r}); for (@$rows) { print "@$_\n" };
_ _ _ _ (_|| | |(_|>< _|