Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
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

In reply to Merge two files with similar column entries by pratapsingh

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (8)
    As of 2014-12-22 22:49 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (132 votes), past polls