Map numbers to a result in perl?

jdr0317

New member
Okay so question
I want to create a perl script (let's call it category.pl)
I'll feed into it 14 files that I have, march_typea, march_typeb, april_typea, april_typeb, etc.
These files will be formatted as:
ID (tab) count
Simply put, I want to be able to map all those #'s to the same ID, or print 0 if it doesn't exist. Would this just be easier to dump it all into one file and read it that way?

Example: ID a9b8 saw 100 actions in march, 80 in april, 60 in may, 40 in june, 28 in july, 20 in august, and 15 in September. I want to write:

a9b8 100 80 60 40 28 20 15

Is this doable?
 
Back
Top