smanicka has asked for the wisdom of the Perl Monks concerning the following question:
I have a file that looks like the example below - and i need a snippet of code that condenses the file as shown in the example - i can read the file line by line - but can anyone tell me how to compare with the rest of the file?
should becomeA:1 B:2 C:3 D:4 CNT:1 STR:1 END:2 A:1 B:7 C:3 D:4 CNT:1 STR:2 END:3 A:1 B:2 C:3 D:4 CNT:1 STR:3 END:4 A:2 B:2 C:3 D:5 CNT:1 STR:4 END:5 A:2 B:2 C:3 D:5 CNT:5 STR:5 END:10 A:3 B:2 C:3 D:4 CNT:1 STR:11 END:12
Any help would be appreciated.A:1 B:MULTIPLE C:3 D:4 CNT:3 STR:1 END:4 A:2 B:2 C:3 D:5 CNT:6 STR:4 END:10 A:3 B:2 C:3 D:4 CNT:1 STR:11 END:12
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: working with files
by Marshall (Canon) on Apr 12, 2010 at 19:08 UTC | |
|
Re: working with files
by choroba (Cardinal) on Apr 12, 2010 at 16:00 UTC | |
by smanicka (Scribe) on Apr 12, 2010 at 16:08 UTC | |
by almut (Canon) on Apr 12, 2010 at 17:26 UTC | |
by choroba (Cardinal) on Apr 12, 2010 at 17:09 UTC |