In addition to the excellent post (++) by brother kcott I should point out just in case you were unaware that your code as posted doesn't even compile.

$ perl -cw 1192233.pl syntax error at 1192233.pl line 23, near "/ARID1B/ {" Missing right curly or square bracket at 1192233.pl line 29, at end of + line 1192233.pl had compilation errors.

If you are seeking help with a particular piece of code it is always worth making sure that it compiles (unless the compilation itself is the problem) and that it is actually the code which you are running.

As a final hint to help you prepare an SSCCE, consider that to make the script self-contained and to ensure that you are not simply reading the files incorrectly, why not replace any reading-from-files with hard-coded arrays containing no more than the first 3 or 4 lines from each file? That makes it much easier for others to run, avoids path, permissions, encoding and EOL issues and aids analysis because the data is right there in the code. Once you have that working you can replace each static set with data read from a file. Do this one at a time in case any such replacement brings in unexpected bugs.


In reply to Re: perl script for extracting gene information from gff file by hippo
in thread perl script for extracting gene information from gff file by Anonymous Monk

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.