map {if (/^".*"$/) {s/\s*"\s*//g; push @fields, $_;} else {push @field +s, split /\s*,\s*/;}} split /,*("[^"]*"),*/, $line;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: One-line CSV Parser
by duelafn (Parson) on Apr 03, 2008 at 23:36 UTC | |
Re: One-line CSV Parser
by idsfa (Vicar) on Apr 04, 2008 at 14:10 UTC | |
Re: One-line CSV Parser
by radiantmatrix (Parson) on Apr 08, 2008 at 16:16 UTC | |
Re: One-line CSV Parser
by ww (Archbishop) on Apr 04, 2008 at 16:01 UTC |