On Fri, Apr 19, 2002 at 10:22:44AM +0200, Martin wrote: > Hi Yo! > > As a Perl rookie I've got a serious problem trying to find out how to write > a code which should do the following stuff: connect to specified URL using > HTTP, send GET / PUT messages and process the output (web page) from the > server. I went throug my Perl guidebook but found nothing according to this > subject. Can anybody give me a hint (and/or suggest a good reference guide > for > Perl on the internet) ?
You'll need LWP::Useragent, or for a minimal approach LWP::Simple (which comes with the same packate) for requesting your page from the server. Then you'll need HTML::Parser for reading and parsing your webpage. Both modules and their dependencies are available from the CPAN and come with a lot of documentation and sample code. Once you've installed them, I suggest starting with perldoc lwpcook which is the libwww-perl cookbook. From there on, you can decide if it's sufficient to use LWP::Simple or if you need the full fledged LWP::UserAgent. Once you have your page, depending on what you need to do with it, You can either use HTML::Parser to do everything on your own, or use one of the available sub modules like HTML::LinkExtor or HTML::TreeBuilder. perldoc HTML::Parser perldoc HTML::LinkExtor perldoc HTML::TreeBuilder There are more modules for this kind of stuff. Click yourself through the module hierarchy at http://search.cpan.org, perhaps you'll find something that exactly fits your needs befor rolling your own... Ask if you run into trouble... -- If we fail, we will lose the war. Michael Lamertz | +49 221 445420 / +49 171 6900 310 Nordstr. 49 | [EMAIL PROTECTED] 50733 Cologne | http://www.lamertz.net Germany | http://www.perl-ronin.de -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]