in reply to LWP parsing problem

Erm, $mech->content returns the content of the "current" (i.e. last fetched) page. Wouldn't that be what you want?

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^2: LWP parsing problem
by Lawliet (Curate) on Jul 05, 2008 at 05:18 UTC
    Ah. Forgot to include some details. I am using HTML::Form and LWP::UserAgent (as well as Mech, of course) to fill out the form. I need HTML::Form to determine what kind of field it is then fill it in accordingly. Then use mech to continue the form.

      To expand a bit on what our nameless member has said, the WWW::Mechanize documentation shows many methods to access the forms on the current page and also many methods to fill out fields in those forms. Under the hood, WWW::Mechanize also uses HTML::Form, but why do you want to reimplement what WWW::Mechanize does if you're already using WWW::Mechanize?

        Why? Because when I tried to use the find_all_inputs method of Mechanize, it returned data that was useless to me. I figured I could do it more simply and efficiently with HTML::Form. Apparently I am wrong :P

        Thanks for all your help.

      Just stick with mechanize. You generally need to show more details than that.