in reply to Re: split $data, $unquoted_value;
in thread split $data, $unquoted_value;

Ruoso, wouldn't Text::CSV and related modules (XS, PP) work for you? I suppose you know this module, so what am I missing?
#!/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"; }
motobói

Replies are listed 'Best First'.
Re^3: split $data, $unquoted_value;
by ruoso (Curate) on Sep 15, 2005 at 17:09 UTC

    Well...

    Good question ;)...

    Maybe I thought it was easier to write the code then looking for a module... how dumb I am... anyway, it was fun to write it... :)

    daniel