CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
need help in file processing

 



utpalmtbi
New User

Jan 31, 2013, 11:16 PM

Post #1 of 4 (514 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...


rovf
Veteran

Feb 1, 2013, 1:21 AM

Post #2 of 4 (510 views)
Re: [utpalmtbi] need help in file processing [In reply to] Can't Post


Quote
Apologies if this post doesn't belong here...


It does, but you need to tell exactly where you got stuck. Maybe you can post the relevant piece of code you have written, and explain where you can't continue.

Also it helps when giving you advice if you can tell us about your general experience in programming.


BillKSmith
Veteran

Feb 1, 2013, 6:46 AM

Post #3 of 4 (496 views)
Re: [utpalmtbi] need help in file processing [In reply to] Can't Post

Please let us know when you post the same question on other forums.
Good Luck,
Bill


FishMonger
Veteran / Moderator

Feb 1, 2013, 7:04 AM

Post #4 of 4 (495 views)
Re: [BillKSmith] need help in file processing [In reply to] Can't Post


In Reply To
Please let us know when you post the same question on other forums.


such as: http://perlmonks.org/?node_id=1016472

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives