|
@ -69,6 +69,7 @@ while ( my $line = <$fh> ) { |
|
|
|
|
|
|
|
|
# my @fields = split( /,/, $line ); |
|
|
# my @fields = split( /,/, $line ); |
|
|
# may be commas between those quotes |
|
|
# may be commas between those quotes |
|
|
|
|
|
# pulled this regexp from https://stackoverflow.com/questions/18144431/regex-to-split-a-csv (solution 45) |
|
|
my @fields = $line =~ m/(?:,|\n|^)("(?:(?:"")*[^"]*)*"|[^",\n]*|(?:\n|$))/g; #m/("[^"]+"|[^,]+)(?:,\s*)?/g; |
|
|
my @fields = $line =~ m/(?:,|\n|^)("(?:(?:"")*[^"]*)*"|[^",\n]*|(?:\n|$))/g; #m/("[^"]+"|[^,]+)(?:,\s*)?/g; |
|
|
# print $#fields . "\n"; |
|
|
# print $#fields . "\n"; |
|
|
( my $leagueId = $fields[1] ) =~ s/"//g; # League |
|
|
( my $leagueId = $fields[1] ) =~ s/"//g; # League |
|
|