Hi, I am totally new to perl programming. Please help me to form a logic for this. I have many files may be 1.txt, 2.txt, 3.txt...... in one directory. Each file contains several data in this format. The ID column will be unique along a file. ID | Name | Place "\n" 1 name1 Chennai 2 name2 Mumbai There can be change the ID -1 can repeat in different file. So I need to search each ID in all the files in the directory and write the attributes for each ID to another file. The resultant file should have unique ID's and the attributes should be from the file with latest creation date. So BASICALLY resulting file will be a master list of ID's and the attributes. please help in this regard. I am only able to read the file and select it and put it in a different file. Could anyone please help me to move forward on this. . Thank you so much in Advance

In reply to How can i Search multiple files one pattern and return the matched values from the latest file? by anandkdas28

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!
  • 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, details, 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, summary, 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.