#!/usr/bin/perl # use strict; use WWW::Mechanize; my $target = "http://www.somewebpage.com/subscription/showsubscribe"; my $mech = WWW::Mechanize->new(agent=>$useragent); $mech->get($target); my $response = $mech->click_button(value=>"subscriptionTop", value=>"loadingSubscription();"); $mech->submit(); die "Error at '$target'\n", $response->status_line, "\n Aborting" unless $response->is_success; $response = $mech->response; for my $key ($response->header_field_names()) { print "response[$key] = ", $response->header($key), "\n"; } #print $mech->content; ####