in reply to Re: CSV cleanup problem...
in thread CSV cleanup problem...
#!perl -w use strict; use Text::CSV_XS; use IO::Scalar; my $str = q{'title'|'Some Name, "some wierd title"'|'555-555-5555'}; my $csv = Text::CSV_XS->new( { binary=>1, quote_char=>q{'}, sep_char=>q{|}, escape_char=>q{'}, } ); my $fh = IO::Scalar->new(\$str); while (my $cols = $csv->getline($fh)) { last unless @$cols; printf "%s\n", join "\n",@$cols; }
|
|---|