
utpalmtbi
New User
Jan 31, 2013, 11:16 PM
Post #1 of 4
(240 views)
|
|
need help in file processing
|
Can't Post
|
|
Hello all, I just started learning Perl and I get stuck on a basic file processing : I have to convert a file format, the program should read a input file and after processing (which counts the number of each term in each group, see below), yield a output file. Here is the format of the input file: Group1: somo|112345478 somo|734567233 homo|233689876 Group2: somo|904686712 somo|891145662 somo|106736432 Group3: aomo|397634567 aomo|123446789 Group4: aomo|905672345 aomo|120846789 ........ .. From the above input, the output file should look like (the numbers after the pipe should not be considered): somo homo aomo Group1 2 1 0 Group2 3 0 0 Group3 0 0 2 Group4 0 0 2 I get stuck on this file conversion for sometime now and unable to figure it out. Any guidance is highly appreciated. Thanks in advance.. Apologies if this post doesn't belong here...
|