Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others surveying the Monastery: (2)
    As of 2018-02-21 06:28 GMT
    Find Nodes?
      Voting Booth?
      When it is dark outside I am happiest to see ...

      Results (275 votes). Check out past polls.