in reply to Automated DNS Update Solution Needed

Wow. That's a big paragraph, and I've only got a slight clue what you're actually asking.

Nevertheless, you can probably remove all references to LWP, HTTP::Request, HTTP::Cookies and HTML::Form from your code and replace them with WWW::Mechanize, which should give you a much cleaner interface to the web-based tool.

As for the rest of your question: what is your question? :-)

Updated because reformatting made the question slightly clearer

I stand by my recommendation of WWW::Mechanize, as it wil almost certainly make your code a lot simpler. The only thing it doesn't do (as far as I know) is give you the value of a filled in textarea field. HTML::Form should be able to do that for you:

$form = HTML::Form->parse($html, $base_uri); $value = $form->value( $name );
You can then parse $value and use the set_field() method of WWW::Mechanize to set the field value to the new value.

If you want more information, you're going to have to go into more detail: what's the code of your script, what's the code of the html page you want to parse. and what do you want to submit back to the router.

Most of us regular monks are glad to help, but we can't read your mind :-)

Replies are listed 'Best First'.
Re^2: Automated DNS Update Solution Needed
by PodMaster (Abbot) on Dec 21, 2004 at 10:55 UTC
    The only thing it doesn't do (as far as I know) is give you the value of a filled in textarea field.
    Sure it does, demonstration (note q=test)
    C:\> perl -MWWW::Mechanize::Shell -e shell
    Module File::Modified not found. Automatic reloading disabled.
    >get http://www.google.com/search?hl=en&num=100&ie=UTF-8&oe=UTF-8&q=test&btnG=Google+Search
    Retrieving http://www.google.com/search?hl=en&num=100&ie=UTF-8&oe=UTF-8&q=test&btnG=Google+Search(200)
    http://www.google.com/search?hl=en&num=100&ie=UTF-8&oe=UTF-8&q=test&btnG=Google+Search>
    http://www.google.com/search?hl=en&num=100&ie=UTF-8&oe=UTF-8&q=test&btnG=Google+Search>forms
    Form [1]
    GET http://www.google.com/search [gs]
     num=100                        (hidden readonly)
     hl=en                          (hidden readonly)
     lr=                            (hidden readonly)
     q=test                         (text)
     btnG=Search                    (submit)
    Form [2]
    GET http://www.google.com/search
     q=test                         (text)
     btnG=Search                    (submit)
     num=100                        (hidden readonly)
     hl=en                          (hidden readonly)
     lr=                            (hidden readonly)
    http://www.google.com/search?hl=en&num=100&ie=UTF-8&oe=UTF-8&q=test&btnG=Google+Search>

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      That's an <input type="text" name="q">, not a <textarea name="q"></textarea>, on googles homepage, right?

      -Any sufficiently advanced technology is
      indistinguishable from doubletalk.

      My Biz

        Heh, yeah, sorry about that. Still, Mechanize does deal with it, actual demonstration this time :)

        C:\>perl -MWWW::Mechanize::Shell -e shell
        Module File::Modified not found. Automatic reloading disabled.
        >get http://babelfish.altavista.com/
        Retrieving http://babelfish.altavista.com/(200)
        http://babelfish.altavista.com/>form 1
        POST http://babelfish.altavista.com/tr [frmTrText]
         doit=done                      (hidden readonly)
         intl=1                         (hidden readonly)
         tt=urltext                     (hidden readonly)
         trtext=                        (textarea)
         lp=                            (option)   [*/Select from and to languages|zh_en/Chinese-simp to English|zt_en/Chinese-trad to English|en_zh/English
        to Chinese-simp|en_zt/English to Chinese-trad|en_nl/English to Dutch|en_fr/English to French|en_de/English to German|en_el/English to Greek|en_it/Engl
        ish to Italian|en_ja/English to Japanese|en_ko/English to Korean|en_pt/English to Portuguese|en_ru/English to Russian|en_es/English to Spanish|nl_en/D
        utch to English|nl_fr/Dutch to French|fr_en/French to English|fr_de/French to German|fr_el/French to Greek|fr_it/French to Italian|fr_pt/French to Por
        tuguese|fr_nl/French to Dutch|fr_es/French to Spanish|de_en/German to English|de_fr/German to French|el_en/Greek to English|el_fr/Greek to French|it_e
        n/Italian to English|it_fr/Italian to French|ja_en/Japanese to English|ko_en/Korean to English|pt_en/Portuguese to English|pt_fr/Portuguese to French|
        ru_en/Russian to English|es_en/Spanish to English|es_fr/Spanish to French]
         <NONAME>=Translate             (submit)
        http://babelfish.altavista.com/>value lp en_nl
        http://babelfish.altavista.com/>value trtext I am Bob.
        http://babelfish.altavista.com/>
        http://babelfish.altavista.com/>submit
        200
        http://babelfish.altavista.com/tr>forms
        Form [1]
        GET http://www.altavista.com/web/results
         q=Ik ben Loodje.               (hidden readonly)
         kls=0                          (hidden readonly)
         ienc=utf8                      (hidden readonly)
         search=Search the web with this text (submit)
        Form [2]
        POST http://babelfish.altavista.com/tr [frmTrText]
         doit=done                      (hidden readonly)
         intl=1                         (hidden readonly)
         tt=urltext                     (hidden readonly)
         trtext=I am Bob.               (textarea)
         lp=en_nl                       (option)   [zh_en/Chinese-simp to English|zt_en/Chinese-trad to English|en_zh/English to Chinese-simp|en_zt/English t
        o Chinese-trad|*en_nl/English to Dutch|en_fr/English to French|en_de/English to German|en_el/English to Greek|en_it/English to Italian|en_ja/English t
        o Japanese|en_ko/English to Korean|en_pt/English to Portuguese|en_ru/English to Russian|en_es/English to Spanish|nl_en/Dutch to English|nl_fr/Dutch to
        French|fr_nl/French to Dutch|fr_en/French to English|fr_de/French to German|fr_el/French to Greek|fr_it/French to Italian|fr_pt/French to Portuguese|
        fr_es/French to Spanish|de_en/German to English|de_fr/German to French|el_en/Greek to English|el_fr/Greek to French|it_en/Italian to English|it_fr/Ita
        lian to French|ja_en/Japanese to English|ko_en/Korean to English|pt_en/Portuguese to English|pt_fr/Portuguese to French|ru_en/Russian to English|es_en
        /Spanish to English|es_fr/Spanish to French]
         <NONAME>=Translate             (submit)
        http://babelfish.altavista.com/tr>

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.

Re^2: Automated DNS Update Solution Needed
by bdgenz (Initiate) on Dec 23, 2004 at 10:58 UTC
    Need to learn how to login too!
    BTW, I'll give WWW::Mechanize a try when I get a chance.
    Thanks again.