Try this one-liner on your "gleandata.csv" file, and see what you get:
(You should put that on the shell command line as a single line -- I just broke it up to avoid the bothersome "+" in the node display.)perl -ne '$n=tr/://;$h{$n}++; END{ print "$h{$_} lines have $_ colons\n" for(sort{$a<=>$b} keys %h)}' < + gleandata.csv
If there were only one field that contained colons as data, and you could figure out how to make that field come last on each line, you could try doing your split like this:
That way, only 24 elements will be returned, and any "extra" delimiters will just be kept inside the 24th element. But a better approach would be:my @row = split(/:/, $line, 24);
(updated last bullet point in hopes of making it clearer)
|
|---|