From 2b067b7c01cc8fb66a041e3cd98bca0f3292509f Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Sat, 19 Aug 2023 14:31:48 -0400 Subject: [PATCH] Noting source for solution. --- google-civic-api.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/google-civic-api.pl b/google-civic-api.pl index 700e890..e9da8c5 100755 --- a/google-civic-api.pl +++ b/google-civic-api.pl @@ -69,6 +69,7 @@ while ( my $line = <$fh> ) { # my @fields = split( /,/, $line ); # 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; # print $#fields . "\n"; ( my $leagueId = $fields[1] ) =~ s/"//g; # League