#!/usr/bin/perl -w
use strict;
use WWW::Mechanize;

my $start = 'http://perdu.com/';

my $mech = WWW::Mechanize->new(agent => 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20121207 Iceweasel/3.5.16 (like Firefox/3.5.16)');

$mech->get($start);
# submit the only form on that page
$mech->submit_form();

# follow META redirect
$mech->content() =~ /<meta http-equiv="refresh" content="0;url=+([^"]*)"/;
$mech->get($1);

# submit "tcnform" form
$mech->submit_form(form_name => 'tncform');

# submit the only form on that page
$mech->submit_form();
