Gossamer Forum
Home : General : Perl Programming :

Good CSV Module?

Quote Reply
Good CSV Module?
Does anyone know of a good CSV module, that allows for the writing, and extraction of a CSV file/to screen?

I tried writing something myself that would do a similar task (for a script im writing), but there are some odd \n's
appearing out of nowhere, and its really getting on my nerves!

Anyone got any suggestions? Or, any input on why I'm getting extra newlines entered from this code;

Code:
while (my $hit = $sth->fetchrow_hashref) {

my $short = GT::CGI::html_escape($hit->{short});
$short =~ s/\n/<BR>/g;
my $full = GT::CGI::html_escape($hit->{full});
$full =~ s/\n/<BR>/g;

$saved .= $hit->{title} . $delimiter . $short . $delimiter . $full . $delimiter . $hit->{date} . $delimiter . $hit->{nice_date} . "\n";
}

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread Good CSV Module? Andy 3717 Sep 16, 2002, 6:20 AM
Thread Re: [Andy] Good CSV Module?
Paul 3623 Sep 16, 2002, 6:22 AM
Post Re: [Paul] Good CSV Module?
Andy 3628 Sep 16, 2002, 6:52 AM