projects
/
migration-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
073fc64
)
improved error reporting
author
Shawn Boyette
<sboyette@esilibrary.com>
Wed, 13 May 2009 14:48:49 +0000 (14:48 +0000)
committer
Shawn Boyette
<sboyette@esilibrary.com>
Wed, 13 May 2009 14:48:49 +0000 (14:48 +0000)
csv_ripper
patch
|
blob
|
history
diff --git
a/csv_ripper
b/csv_ripper
index
098d287
..
8ae35e9
100755
(executable)
--- a/
csv_ripper
+++ b/
csv_ripper
@@
-14,13
+14,13
@@
use warnings;
use Text::CSV;
-my $csv = Text::CSV->new();
+my $csv = Text::CSV->new( {binary => 1});
open CSV, '<', shift or die "Can't open file $!\n";
while (<CSV>) {
$csv->parse($_);
- die "Bad data on line $.\n" if ($csv->error_diag);
+ die "Bad data on line $.\n$_\n" if ($csv->error_diag);
my @chunks = $csv->fields;
my @out = ();
for my $chunk (@ARGV)