http://www.perlmonks.org?node_id=991388

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

First timer and an absolute perl novice who has a MASSIVE(my POV) task at hand. Need to write a script to: 1. Go to a website 2. Log in 3. Click a particular button 4. Modify the pop up form (that has drop downs too) 5. Submit The catch is - No using WWW::Mechanize. Can only use LWP and HTTP modules. Help!!

Replies are listed 'Best First'.
Re: Using perl for web actions
by marto (Cardinal) on Sep 03, 2012 at 10:44 UTC

    Use Wireshark to find out what a real browser sends when performing these tasks, automate with LWP (see also lwptut). Failing that consider removing the WWW::Mechanize restriction.

Re: Using perl for web actions
by Corion (Patriarch) on Sep 03, 2012 at 10:55 UTC

    Also see Yes, even you can use CPAN. There is very little reason not to use WWW::Mechanize, especially if you already have LWP available.

Re: Using perl for web actions
by Khen1950fx (Canon) on Sep 03, 2012 at 10:53 UTC
    Why can't you use Mechanize?
      Perhaps because that's what the teacher said in creating this "MASSIVE... task" ... to focus learning on the allowed modules?
        It would have been kind of nice if you told the Monastery beforehand this is a homework assignment.

        Update: How strange. I definitely recall having answered on a post from the OP, but that post now seems gone.

        CountZero

        A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

        My blog: Imperial Deltronics
Re: Using perl for web actions
by Anonymous Monk on Sep 03, 2012 at 16:26 UTC
Re: Using perl for web actions
by perlcub (Initiate) on Sep 03, 2012 at 10:40 UTC

    And just to add I can't use Win32 either. Using perl on Linux.