# given a DBI handle $dbh, a database table "foo" with a column "bar" print join "\n", map join("\t", @$_), @{$dbh->selectall_arrayref( q{ select bar from foo } )};