--- a/williamr/buglist_to_mediawiki.pl Thu May 20 17:04:35 2010 +0100
+++ b/williamr/buglist_to_mediawiki.pl Thu May 13 16:27:37 2010 +0100
@@ -16,12 +16,26 @@
use strict;
+use FindBin;
+use lib "$FindBin::Bin\\..\\lib";
+use Text::CSV;
+
+my $csv = Text::CSV->new();
+
print "{|\n"; # start of table
while (my $line = <>)
{
chomp $line;
- my @columns = split /\t/, $line;
+
+ unless ($csv->parse($line))
+ {
+ my $err = $csv->error_input();
+ warn "Failed to parse line '$line': $err\n";
+ next;
+ }
+
+ my @columns = $csv->fields();
next if scalar @columns < 2; # skip dubious looking lines