version 1.31, 2021/05/19 21:52:11 |
version 1.33, 2021/06/04 14:47:20 |
Line 153 LINE: while (<STDIN>) { |
|
Line 153 LINE: while (<STDIN>) { |
|
} |
} |
my $copy_line = $line; |
my $copy_line = $line; |
my @fields; |
my @fields; |
if ($quote) { |
while ($copy_line =~ /./) { |
push @fields, $1 while $copy_line =~ s/$quote([^$quote]*)$quote$delim?//; |
$quote && $copy_line =~ s/^$quote(.*?)$quote(?:$delim|$)// |
} else { |
or $copy_line =~ s/^(.*?)(?:$delim|$)//; |
@fields = split /$delim/, $line; |
push @fields, $1; |
} |
} |
my $matches = 0; |
my $matches = 0; |
my ($account, $booking); |
my ($account, $booking); |
Line 175 LINE: while (<STDIN>) { |
|
Line 175 LINE: while (<STDIN>) { |
|
} |
} |
} |
} |
$matches or die "unmatched CSV line: $line"; |
$matches or die "unmatched CSV line: $line"; |
my $date = $fields[$date_field] or |
my $date = $fields[$date_field]; |
die "date parse error: $line"; |
defined $date or die "undefined date: $line"; |
|
$date or die "date ($date) parse error: $line"; |
eval '$date =~ ' . $date_regex; |
eval '$date =~ ' . $date_regex; |
foreach my $i (@amount_fields) { |
foreach my $i (@amount_fields) { |
if (defined($fields[$i])) { |
if (defined($fields[$i])) { |