At 23:35 Uhr -0400 01.10.2001, Scott R. Godin wrote: >In article <p04320400b7ae77073947@[149.225.14.108]>, > [EMAIL PROTECTED] (Thomas Wegner) wrote: > >> Greetings, >> >> I've put together a basic DBI bundle for MacPerl 5.6.1aX. Here's the >> description: > >> Let me know if you have any problems. > >downloaded it, installed, generally works perfectly (congrats!) but I'm >having one issue > >I have a tab-separated mac-linefeed-separated text file that some other >perl scripts generate as output (sucked down and parsed with >HTML::Parser from an .asp - generated SQL table query), and which I have >a mess of other perl scripts to generate reports from. > >I really have no wish to re-save this file in DOS format, or change the >output record separator for (and the input record separator in all the >other suite files) just so I can use DBD::CSV with it. > >the problem is this: > > o unable to set csv_eol=\015, but saving the file via bbedit to DOS >instead of Macintosh, the below works?!? what the hell? > > setting csv_eol=\015 when file format is saved as Macintosh results in >this error, searching for "test": > >DBD::CSV::st execute failed: Missing first row at Primus >8.5GB:Applications:MacPerl 5.6.1a4 ?:site_perl:DBD:CSV.pm line 157, ><GEN0> line 1. > > o if fileformat is DOS and csv_eol=\015, it searches the file but >finds 0 results > > o if fileformat is DOS and I SET csv_eol=\015\012 it FINDS THE 7 >RESULTS PROPERLY O_o > >i.e. it's only confused SOMEtimes. somewhere, it's assuming the file is >a DOS file, even though I'm setting csv_eol properly... the question is >WHERE? > >my $dbh = DBI->connect( >"dbi:CSV:f_dir=${dbi_connect_dir};csv_sep_char=\t;csv_eol=\015\012", '', >'', { RaiseError => 2 }) > or die "Can't connect to database: $DBI::errstr"; > >I can post the entire script (or e-mail it) if necessary. > >-- >Scott R. Godin | e-mail : [EMAIL PROTECTED] >Laughing Dragon Services | web : http://www.webdragon.net/
May I suggest that you ask Jochen Wiedmann about this problem? I've (a) never seriously used DBD::CSV and (b) don't know its code very well. From playing with it, I remember that changing the default csv_eol=\015\012 caused problems; but I've never (tried to) figured out why. You might also want to take a look at DBD:AnyData, the successor of DBD::RAM. Don't know if that module fits your needs, though. Best regards, --Thomas _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com