in reply to Skript help needed - RegEx & Hashes
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Script help needed - RegEx & Hashes
by hippo (Archbishop) on Oct 10, 2018 at 11:14 UTC | |
by haukex (Archbishop) on Oct 10, 2018 at 11:34 UTC |