#!/usr/bin/perl -Tw use diagnostics; use strict; use WWW::Mechanize; use HTTP::Cookies; my $mech = WWW::Mechanize->new; # $mech->cookie_jar( # HTTP::Cookies->new( # file => "/windows/C/Documents and Settings/xxx/Application Data/Mozilla/Firefox/Profiles/xxx.default/cookies.txt", use LWP::Debug qw(+); my $url = "http://rootforum/index.php?page=post&forum=forum&category=6&topic=452223&option=newpost"; $mech->get($url); $mech->submit_form( form_number => 2, # the first form of the page is a search bar fields => { message => "Hello", valid => "Post this message" }, );