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;
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!
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!