http://qs321.pair.com?node_id=484904

jonp has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,
I am trying to write a perl script that will go to a web page (http://www.arabidopsis.org/Blast/),
select the right options from the drop down menus, fill in the Input text field, and then submit the form.
Here is my code:
#!/usr/local/bin/perl use strict; use lib "/common"; use LWP; my $browser = LWP::UserAgent->new; my $sequence = 'GTGACGAGGAGGAAGAAAGAGTGCGGTTGTTTTGTTTGACACTTCTTTTCTTTC +TCCTCCAACGGTCCAACTTTGACTCTCTCTTCTCTTCTCTGAAAATTCTTCTATTCATTCATCTTCCTA +TCTTTCCCATGGAAGTGGAACAACAACAATATCTTCTCCAATTTCTCTAACCCTAAATTAACCGCTTCA +CCGCACAATTTCATATTTCCTTTCTCTCTTTGATCGGTTATCATGTCCGTTTTGGTTGTAACCGCCATG +GATTTCGCCGTCCTCGGTTTTCTTATTCCCTCGCTCTGGGAGATCGAAGTCGCTTTCGCTGCCTCGCTT +TTCGTTATTCTCGCGTATTGGTTCTTCACATTTAGAATCGCTGACCGTCACTCCGATCGATCACTTTCG +GAAAATTCCGCCGGTGATTCCGCCGACGATAAAGTCAAGATTGGCCAGTCAAGAGGAGATTCTCAAGCC +GGTTCGGCGTACCTGATTAAGTTAGAACTATTGGCTGCTAAAAATCTGATAGCTGCAAATTTAAATGGC +ACATCGGATCCTTACACCATCATCACATGCGGCAATGAAAAGCGATTCAGTTCCATGGTCCCTGGTTCA +AGAAATCCAATGTGGGGCGAAGAGTTCAATTTTTCTGTCGATGAACTTCCTGTCCAGATCAATGTCACA +ATTTATGATTGGGATATAATTTGGAAAAGTGCTGTTCTTGGTTCAGTGACCGTTCCAGTTGAAAGTGAA +GGTCAAACTGGTGCAGTGTGGCATACTTTGGACAGCCCATCAGGGCAGGTTTGTCTTCATATAAAAACA +GAAAAAATGTCTGCAAATTCTGCCAGGATAAATGGTTATGGCGGAGCCAACACTCGAAGAAGGATACCC +TTGGAAAAACAGGAACCCACAGTAGTCCATCAAAAGCCAGGACCTCTTCAAACGATATTTGAGCTTCAT +CCAGATGAGGTTGTTGATCATAGTTACTCTTGTGCACTTGAAAGGTCATTCTTGTACCATGGTCGTATG +TATGTCTCAACATGGCACATTTGTTTCCATTCCAATGTGTTCTCGAAGCAAATGAAGGTGCTTATTCCG +TTTGAAGATATAGATGAGATTCGAAGGAGTCAACATGCATTTATTAATCCTGCTATAACAATTATTCTT +CGTATGGGTGCCGGTGGACATGGTGTCCCTCCTTTGGGAAGTCCTGATGGTAGAGTCAGATATAAGTTT +GCGTCATTTTGGAACAGGAATCATGCAGTTAGAAGTCTACAACGTGCTGTAAAGAACTTCCGTGAAATG +TTGGAAACTGAGAAGAAGGAAAATGCAGAGTCAGAATTGCGTGCACATAGCAGTTCTGTTAGACGAAGT +AACATAATGGATAAGGTTCCCGAAACCAGCATGCCAAAAGCTGGAAAACGTCAAACTTTTATCAAAGAA +GAGGCTTTAGTTGGTATATACAATGATGTTTTCCCCTGCACAGCAGAGCAGTTTTTTAACTTATTGTTA +AAGGACGATTCAAAATTTACTAGCAAGTATCGTTCAGCACGAAAGGATACTAATCTTGTGATGGGACAA +TGGCATACAGCAGAAGAATATGACGGTCAAGTCCGGGAGATAACCTTCAGATCCCTTTGTAACAGCCCT +ATGTGCCCGCCAGACACAGCCATTACTGAGTGGCAACATGTTGTTCTATCATCTGACAAGAAAAACCTG +GTGTTTGAGACTGTGCAACAGGCACACGATGTTCCACTCGGGTCCTGTTTTGAGGTGCACTGTAAATGG +GGTTTGGAGACAACTGGTGAAAGTTCATGTACTCTGGACATAAGAGTGGGTGCACATTTCAAGAAATGG +TGTGTGATGCAATCCAAAATAAAATCAGGGGCAATCAATGAGTACAAGAAAGAAGTTGATGTGATGTTA +GATGTTGCTCGTTCATATATAAAGCCGCATACTTCTGATGACGAGAATGATAAGGCATCTTCGCCCCCT +GCGGCAACTTTGGAAAATAAATTTTTCTGTGTAACCTTAGATTAGGACTTTGTTGGTCTGTGCAATATT +GTAACTTTCCTTCTCTTAAGTTATTTATTTATTCTTGCAACACAGCGCCCAAAGCCATGTATATTTATT +TTGATGCACAGTTGGTTTTTGTCTTGTGTATCTCTGTGGGTAACTTG'; my $URL = "http://www.arabidopsis.org/Blast/"; #BLASTX:NT query, AA db ->blastx #AGI Proteins (Protein) ->ATH1_pep #query sequence ->QueryText my $response = $browser->post( $URL, [ 'Algorithem' => 'blastx', 'BlastTargetSet' => 'ATH1_pep', 'QueryText' => $sequence, ] ); my $page = "/common/perlscripts/WebReading/page.html"; open(OUT,">$page") or die "can't open ", $page; print OUT $response->decoded_content; close(OUT);

I am trying to get the form to submit (the 'Run Blast' button), so that $response contains the data from the results page, but I can't figure out how to do that. If anyone knows a good web site for me to look or knows the answer, I would really appreciate it.
Thanks
Jon