Posted on 2008-07-25 01:32:03-07 by tampat76
Text::CSV_XS
I am decoding the following line with ,,,36832468,-,-,-,3473,"This is a test ""Test" This is a first line" ,,,36832468,-,-,-,3473,"This is a test "test" This is a second line" ,,,36832468,-,-,-,3473,"This is a tmp1,tmp2,tmp3 "test" audio quality survey" Using the following code in the perl script my $csv = Text::CSV_XS -(greater then symbol) new (); or my $csv = Text::CSV_XS- (greater then symbol)new ; $status = $csv- (greater then symbol) parse ($file); @column = $csv- (greater then symbol) fields (); When I am doing this the values in the column filed are getting set as blank and event the status show is coming as "0" My requirement is in any field the text may contain the nested double codes and also the field can contain the comma's in the double code. please some help me to decode this CSV records
Direct Responses: 8403 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.