Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Using perl for web actions

by perlcub (Initiate)
on Sep 03, 2012 at 10:30 UTC ( #991388=perlquestion: print w/replies, xml ) Need Help??
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 (Archbishop) 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 (Pope) 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.


        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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://991388]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2018-08-15 01:35 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (158 votes). Check out past polls.