Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: The future of Text::CSV_XS - TODO

by Tux (Monsignor)
on Apr 16, 2008 at 14:23 UTC ( #680807=note: print w/ replies, xml ) Need Help??

in reply to The future of Text::CSV_XS - TODO

file: $CPAN/authors/id/H/HM/HMBRAND/Text-CSV_XS-0.42.tgz size: 86136 bytes md5: 1cf4491f48965793f1e31fc74159f20f We can do MAGIC now! Dumping the content of a database ($dbh) table ($tbl) to CSV: my $csv = Text::CSV_XS->new ({ binary => 1, eol => $/ }); open my $fh, ">", "$tbl.csv" or die "$tbl.csv: $!"; my $sth = $dbh->prepare ("select * from $tbl"); $sth->execute; $csv->print ($fh, $sth->{NAME_lc}); while (my $row = $sth->fetch) { $csv->print ($fh, $row); } close $fh; 2008-04-16 0.42 - H.Merijn Brand * Generate META.yml myself. I won't use Build.PL * Array-refs now accept scalars with magic: $csv->print (*STDOUT, $sth->{NAME_lc}); * More/better examples * Added t/76_magic.t

Enjoy, Have FUN! H.Merijn

Comment on Re: The future of Text::CSV_XS - TODO
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://680807]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2016-02-06 14:08 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (229 votes), past polls