####
#!/usr/bin/perl -w
use strict;
use WWW::Mechanize;
use Crypt::SSLeay;
use HTTP::Cookies;
my $agent = WWW::Mechanize->new();
my $cookie_file = "Cookies.txt";
$agent -> cookie_jar( HTTP::Cookies->new( File => $cookie_file, autosave => 1 ));
my $page = 'http://...';
# Request the page.
$agent -> get( $page );
# Set the radiobutton 'Radio' to the second option.
$agent -> set_fields( 'Radio' => '2' );
# Now post the poll form to the URL given in the source code under action="http://...".
$agent -> post( 'http://...' );