in reply to Returning hash reference from a sub

seems to me you are going to a lot of trouble to return a single row.

#sniglet # # somewhere in your while loop return { names => $row->{names} } if $row->{names};

Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg