I'm finding myself using this idiom a lot for a current project. Adjust to taste for your own applications.
# 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 } )};
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Output results from a DBI select query in one line
by merlyn (Sage) on Apr 11, 2006 at 16:12 UTC | |
by jZed (Prior) on Apr 11, 2006 at 18:09 UTC | |
by mjg (Scribe) on Apr 11, 2006 at 18:30 UTC |
Back to
Cool Uses for Perl