in reply to Re: split $data, $unquoted_value;
in thread split $data, $unquoted_value;
motobói#!/usr/bin/perl -w use Text::CSV_XS; my $csv = Text::CSV_XS->new( { 'escape_char' => '\\' } ); my $line = '"This is a column","Yes, I know",12323,23123.23,"This is a + \"column\""'; if ( $csv->parse($line) ) { print join "\n", $csv->fields, "\n"; } else { print "Could not parse line\n", $csv->error_input, "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: split $data, $unquoted_value;
by ruoso (Curate) on Sep 15, 2005 at 17:09 UTC |