See the update_html method. The example that comes with it does exactly what you want.
In reply to Re: WWW::Mechanize get($variable) by Corion in thread WWW::Mechanize get($variable) by jonnyfolk