http://www.perlmonks.org?node_id=964028

pratapsingh has asked for the wisdom of the Perl Monks concerning the following question:

Hi , I have few files which contains user name and data transfer rate in MBs and this data is collected for year and for each month report is saved in 12 different files I have to merge all the files to prepare the final report Files are as below
Filename1 : January #User Name #Data Transferred A. Paul 300004 Jason 600000 Mayur Pandey 40000 Kelly H 459000 Ryan M 349000
Filename2 : March #User Name #Data Transferred Senthl V R 600000 Mayur Pandey 40000 Kelly H 459000 Pratap S 349000 A. Paul 300004
Similarly I have 10 more files I have to merge all these files to one file and final output should be like below one:
Final Report: #Username #January .... #March ......... #December +#Total A. Paul 300004 300004 Not avail +able 600008 Pratap S Not availanble 30000 32000 + 7899887 Kelly H 459000 459000 459000 + 3424448274 Mayur Pandey 40000 400000 400000 + 242424442 Senthl V R Not available 600000 34544 + 53546464 Jason 600000 Not available 3434343 + 43434355
I need a perl script to automate this rather using excel or doing manually . These reports are generated monthly and names are not stored in sorted order. Names are stored in recent user who has used data transfer facility. And also there are occasions when a user have not used data transfer at all for particular month in this case name of the user will not appear in monthly report file. In this case I have to add not available in the month name column. Thank you