in reply to WWW-Mechanize

If you want to query known fields, use the method described by jbrugger above; however, if you want to output the current values for all select inputs on a page:

#!/usr/bin/perl -w use strict; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get("http://some.domain.tld/form.html"); foreach ($mech->forms) { print $_->value,"\n" foreach ($_->find_input( +undef,'option')); }

See Also: WWW::Mechanize and HTML::Form