Thank you very much for your comment. Sorry for the inconvenience. Using "sep=\t" in your first script solved the problem and this give me the exact output as the latest script

my %dict =  map { chomp; split '\t', $_, 2 } <$fh>;

I have another problem. In the result, I still have previous text in many cells. Its strange, some cells replaced exactly some not. Either they might not be replaced or replaced by the 1st column of the 'egg_pathway_title.txt'. I was trying to delete those strings but failed. What I have done

ut -f1 bioDBnet_db2db_KEGG_Title_final.txt > exclude-these.txt

but failed. I have tried in many ways. Is there any way to upload my files here? Best Regards Zillur


In reply to Re^4: Parsing csv without changing dimension of original file by zillur
in thread Parsing csv without changing dimension of original file by zillur

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.