Hi, I am new with Perl, and I am getting a little crazy trying to solve a problem with files (that is maybe trivial). I have two files in the form of columns separated by tabs, one with my data (IDs and numbers assigned to these IDs) and the other one with IDs conversions. I need to substitute the IDs in my data file for the other IDs. For example, my data file is like this: ID number \n house 325 \n car 1456 \n table 2489 \n ... And the conversion file is: car opel \n house flat \n table wood \n ... What I want is something like this: ID number flat 325 opel 1456 wood 2489 ... I am going over through many tutorials but I am quite lost, I don't know how even start. Can someone help me? Many thanks, Herny

In reply to file handling by herny

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.