<?xml version="1.0" encoding="windows-1252"?>
<node id="973851" title="stuck with WWW::Mechanize drop down list" created="2012-06-01 15:23:34" updated="2012-06-01 15:23:34">
<type id="115">
perlquestion</type>
<author id="968137">
abualiga</author>
<data>
<field name="doctext">
&lt;p&gt; Hi Monks,&lt;/p&gt;
&lt;p&gt;
I'm a perl beginner and am learning to use the www::mechanize module to get a list of genome sequencing projects from http://www.ncbi.nlm.nih.gov/Traces/wgs/.  After I fill in the form, I cannot figure out how to select 'All' from the 'Show projects on page' listbox.&lt;/p&gt;  
&lt;p&gt;I tried 'find_all_inputs' with 'select' as criteria for a listbox, but nothing gets assigned to the variable.  My other issue is not being able to click on the 'Download as TAB delimited list' link to output results to file.&lt;/p&gt;
&lt;p&gt;I can complete this task using the browser, but then I don't learn.  Below are the few lines of code I have so far.  Your advice will be a great help.&lt;/p&gt;  
&lt;p&gt;
many thanks!
&lt;/p&gt;


&lt;code&gt;
#!/usr/local/bin/perl
use strict;
use warnings;
use autodie qw/ open close /;
use 5.012;
use WWW::Mechanize;

# create WWW::Mechanize object
# autocheck 1 checks each request to ensure it was successful
my $browser = WWW::Mechanize-&gt;new( autocheck =&gt; [1] );

# retrieve page
$browser-&gt;get( 'http://www.ncbi.nlm.nih.gov/Traces/wgs/' );

#select form to fill based on mech-dump output
$browser-&gt;form_number(1); 
# fill field 'term' with name of species
$browser-&gt;field( 'term', 'Escherichia' );

# click apply button
$browser-&gt;submit( 'Apply' );

my $url = $browser-&gt;uri;
# launch browser to test url
#system( 'firefox', $url );

my @inputs = $browser-&gt;find_all_inputs(
    type =&gt; 'select'
);
say @inputs;
&lt;/code&gt;
</field>
</data>
</node>
