Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: Re: Automated form submission

by scain (Curate)
on Mar 05, 2002 at 14:45 UTC ( [id://149378]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Automated form submission
in thread Automated form submission

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

Replies are listed 'Best First'.
Re: Re: Re: Re: Automated form submission
by dr_jgbn (Beadle) on Mar 06, 2002 at 04:31 UTC
    Thanks for your help Scott...I will try this
    I suppose it is clear that I am somewhat of an amateur, and so I appreciate it.
    You might see me sometime in the future asking another simple question,
    Cheers,
    Dr.J

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://149378]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-19 19:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found