RE: CSV problem on Solaris
- From: Philip.Garrett@xxxxxxxxxxx (Philip Garrett)
- Date: Wed, 28 Jun 2006 10:22:29 -0400
-----Original Message-----
From: Govinda.Pfister@xxxxxxxxxx [mailto:Govinda.Pfister@xxxxxxxxxx]
Sent: Wednesday, June 28, 2006 9:47 AM
To: Garrett, Philip (MAN-Corporate)
Subject: AW: CSV problem on Solaris
[snip]
I do have a problem with a littler perl script I wrote. It uses
DBD:CSV and I don´t know why it doesn´t work as I would expect it.
my $dbh = DBI->connect("DBI:CSV:");
Add this after connecting:
$dbh->{RaiseError} = 1;
This will cause DBI to die with an error message when there is a
problem.
Just inserted. Fired the script again.
The result is the same.
That probably means that you do indeed have a line-ending problem. I
have tested this on Solaris and I have the same problem. The issue is
that the default line ending for DBD::CSV is CR/LF (DOS format), but
(apparently?) UltraEdit uses Unix line endings (LF).
There are a couple of solutions:
* Use unix2dos to convert the CSV file format, or
* Specify line ending in the DBI connect call:
my $dbh = DBI->connect("DBI:CSV:csv_eol=\012");
Philip
.
- Prev by Date: RE: CSV problem on Solaris
- Next by Date: timestamp datatype
- Previous by thread: RE: CSV problem on Solaris
- Next by thread: RE: CSV problem on Solaris
- Index(es):
Relevant Pages
|
|