Well, I am not sure of the exact nature of your problem from you description, but I would clean up a few stylistic things, and maybe along the way your problem will clear up too.

First, when reading in a file you can either do it in a while loop, in which case it will read in line by line, or you can slurp it all at once by assigning the filehandle to an array (each line becoming an element of the array). You've done a hybrid of both here, and that may be the source of your problem. Most people agree that the way to go is to read line by line, that way if you get an input file that is bigger than you expect, you don't pay any penalties for slurping a huge file into memory.

Also, since you are reading the file in line by line, you can do the rest of the work in the while loop, resulting in:

print "\nPROCESSING file $file...\n"; while (<FILE>) { chomp $_; $accession = $_; etc....I have made the necessary corrections now }
If you desided you don't want to do it that way, I would at least change your for loop to a more Perlish loop:
foreach my $accession(@acc) { chomp $accession; etc....I have made the necessary corrections now }
Good luck,
Scott

In reply to Re: Re: Re: Automated form submission by scain
in thread Automated form submission by dr_jgbn

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.