<?xml version="1.0" encoding="windows-1252"?>
<node id="617386" title="I would like to find a good logic to parse the data" created="2007-05-24 22:52:34" updated="2007-05-24 18:52:34">
<type id="115">
perlquestion</type>
<author id="571598">
greatshots</author>
<data>
<field name="doctext">
Dear monks,

&lt;p&gt;

In my Input file I could see 3 different types of lines as specified below.
If I split the lines using ',' The results are weired for the first line.
Because the first line contains lot of ','s inbetween Double quote. 

How can I make my parsing logic to work perfectly.

I need your logics to parse this files.

I can write a program.

Thanks a lot,

&lt;code&gt;
__DATA__
Submitted,"696,028","50,946","810,590","836,505","13,923,241","13,776,443","14,179,619","14,614,558","14,704,885","14,634,911","15,055,774","15,127,534","14,458,899","14,403,378","14,566,425","14,644,406","14,524,069"
Expired,245,275,273,248,240,295,353,316,371,398,387,352,310,288,405,274,270
Less in,90.12%,90.49%,90.04%,89.55%,90.09%,90.63%,90.37%,90.48%,90.73%,90.59%,90.83%,90.40%,88.82%,90.71%,90.72%,90.69%,91.04%
&lt;/code&gt;

&lt;code&gt;
The output should look like as below,

Field1    Field2   field3  field4  field5   ..... Fieldn
Submitted 696,028  50,946  810,590 836,505  ..... blahblah
Expired   245       275     273    248      ......blahblah
Less      90.12%    90.49%  90.04% 89.55%   ......blahblah
&lt;/code&gt;

&lt;/p&gt;</field>
</data>
</node>
