ChangBrown has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
Im working on an lwp agent that will allow me to log into my aol mail account in an automated manner.. however ive come across a problem regarding the submit button for my screen name and password info as well as the hidden variables..

The problem is there is no name assighned to the submit button, only a value:
INPUT TYPE="SUBMIT" VALUE="Sign In" tabindex=4>&nbsp; <INPUT TYPE="BUTTON" VALUE="Cancel"
the source is avaliable at: http://my.screenname.aol.com/_cqr/login/aimAutoLoginFail.psp?aimWaitCancel=y&triedAimAuth=y

The lwp book i have expresses the need for a variable name and i dont know what to assighn it as. PLEASE HELP.

CHANG.

edited: Tue Oct 28 04:22:47 2003 by jeffa - code tags, square brackets to activate url as link

Replies are listed 'Best First'.
Re: LWP FORM POSTing help
by jeffa (Bishop) on Oct 28, 2003 at 04:27 UTC
    You should switch to WWW::Mechanize, which is a subclass of LWP::UserAgent. WWW::Mechanize provides methods which abstract away cumbersome items like having to know what the name of a form or submit button is - it also provides a cookie jar and history of visted pages. See the documentation for examples.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)