in reply to Re^2: Formatting question??
in thread Formatting question??
still the same errors. Fetch returns a scalar reference, not a list, and don't fetch within the fetch on the same handle
my $csv = Text::CSV_XS->new ({ binary => 1, eol => "\r\n" }); # First print the Header row $csv->print (*STDOUT, $_read_sth->{NAME}); # Then show all records # v---! while (my $row = $_read_sth->fetchall_arrayref) { $csv->print (*STDOUT, $row); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Formatting question??
by sudip_dg77 (Novice) on Apr 14, 2008 at 15:38 UTC | |
by Tux (Canon) on Apr 14, 2008 at 21:17 UTC | |
by Tux (Canon) on Apr 16, 2008 at 07:10 UTC |