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


in reply to Retrieving contents of web pages

If you want to avoid the complexity of LWP and other HTML parsing modules, you may want to look at WWW::Chat, which is one of the easiest way to navigate through websites with perl. This modules creates LWP + HTML::Form scripts automatically via the webchatpp program.
There's still some features missing in this module, but it usually does a fair job. And more features may be added soon!

A simple example webchatpp script of what you want may look like this:

GET http://www.mysite.com/loginpage.html EXPECT OK FORM login F login=OeufMayo F password=s33kret CLICK EXPECT OK FOLLOW /Interesting link/ EXPECT OK for (@links){ print join("\n", map{ "@$_[1]\n\tURL: @$_[0] "} @links); }

Pretty simple, isn't it?

<kbd>--
my $OeufMayo = new PerlMonger::Paris({http => 'paris.mongueurs.net'});</kbd>