Welcome to Perl and PerlMonks, PandaRaey!

First, a few general tips:

The last point may even account for your problem, "I do not get the content I should printed into the Merge-File". Another possibility is that you might want to open that file for appending (">>"), because ">" overwrites the file (Update: I just saw that hippo made the same point.).

Other than that, I have looked at your code, and nothing obvious has jumped out at me yet. A few thoughts: You don't seem to be chomping the lines you read from files (removing the newline at the end), and you could use some of the tips from the Basic debugging checklist, like using Data::Dumper to print out the contents of your variables while your program is running (I recommend setting $Data::Dumper::Useqq=1; to see whitespace better). Also, I see you're doing $tRNAname = $line[0]; $tRNAname = $&;, which doesn't make sense to me because the second assignment will just overwrite the first. Other than that, your expected output seems to depend on your data and algorithm.

The problem is that without sample data, we can't really run the code. It would be best if you could provide a Short, Self-Contained, Correct Example, that is, some small sample input that demonstrates your problem, the expected output for that input, and your actual output, including any error messages you might be getting (all within <code> tags). Also a description of what your algorithm is supposed to be doing would help.


In reply to Re: Skript help needed - RegEx & Hashes by haukex
in thread Skript help needed - RegEx & Hashes by PandaRaey

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.