in reply to Re: Re: Automated form submission
in thread Automated form submission
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:
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:print "\nPROCESSING file $file...\n"; while (<FILE>) { chomp $_; $accession = $_; etc....I have made the necessary corrections now }
Good luck,foreach my $accession(@acc) { chomp $accession; etc....I have made the necessary corrections now }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Automated form submission
by dr_jgbn (Beadle) on Mar 06, 2002 at 04:31 UTC |