greatshots has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks,
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,
__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,27 +4,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%
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: I would like to find a good logic to parse the data
by friedo (Prior) on May 25, 2007 at 02:55 UTC | |
Re: I would like to find a good logic to parse the data
by naikonta (Curate) on May 25, 2007 at 13:32 UTC | |
Re: I would like to find a good logic to parse the data
by perleager (Pilgrim) on May 25, 2007 at 04:15 UTC | |
Re: I would like to find a good logic to parse the data
by greatshots (Pilgrim) on May 25, 2007 at 03:02 UTC | |
by GrandFather (Saint) on May 25, 2007 at 03:14 UTC | |
by varian (Chaplain) on May 25, 2007 at 08:38 UTC | |
by Tux (Canon) on Jun 01, 2007 at 09:44 UTC |
Back to
Seekers of Perl Wisdom