http://qs321.pair.com?node_id=272729


in reply to perl dbi - no column headings

You need to grab the column names manually:

my $sth = $dbh->prepare($sql); $sth->execute() || die $sth->errstr; my $columns = $sth->{NAME}; print IN join( "\t", @{ $columns } ), "\n"; while ( my @row = $sth->fetchrow_array ) { print IN join("\t", @row), "\n"; }

Chris
M-x auto-bs-mode

Replies are listed 'Best First'.
Re: Re: perl dbi - no column headings
by cosmicsoup (Beadle) on Jul 09, 2003 at 18:40 UTC
    Chris,

    Your solution worked perfectly.

    Thanks,
    Louis