in reply to LWP post
check LWP::UserAgent
an example:
an example:
Update: Fixed the 'my'use strict; use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->agent("MyApp/0.1 "); my $req = HTTP::Request->new(POST => 'http://search.cpan.org/search'); $req->content_type('application/x-www-form-urlencoded'); $req->content('query=libwww-perl&mode=dist'); my $res = $ua->request($req); if ($res->is_success) { print $res->content; } else { print $res->status_line, "\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: LWP post
by Anonymous Monk on Feb 24, 2005 at 05:36 UTC | |
by ikegami (Patriarch) on Feb 24, 2005 at 05:46 UTC |
In Section
Seekers of Perl Wisdom