my $mech = WWW::Mechanize->new(); $mech->get('.'); # to make it internall create request/response objects $mech->update_html($html); # then use normally