ls -la /usr/lib/perl5/site_perl/5.6.1/LWP/Protocol total 96 drwxr-xr-x 2 root root 4096 Mar 10 20:18 . drwxr-xr-x 4 root root 4096 Mar 10 20:18 .. -r--r--r-- 1 root root 1279 Nov 19 1998 data.pm -r--r--r-- 1 root root 3827 Aug 6 2001 file.pm -r--r--r-- 1 root root 17014 Oct 26 2001 ftp.pm -r--r--r-- 1 root root 1823 Apr 9 2001 GHTTP.pm -r--r--r-- 1 root root 5783 Nov 19 1998 gopher.pm -r--r--r-- 1 root root 8459 Oct 26 2001 http10.pm -r--r--r-- 1 root root 10566 Sep 20 2002 http.pm -r--r--r-- 1 root root 1822 Oct 26 2001 https10.pm -r--r--r-- 1 root root 1236 Nov 16 2001 https.pm -r--r--r-- 1 root root 4190 Mar 19 1999 mailto.pm -r--r--r-- 1 root root 3749 Nov 19 1998 nntp.pm -r--r--r-- 1 root root 630 May 5 2001 nogo.pm #### # Create a user agent object use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->agent("MyApp/0.1 "); # Create a request my $req = HTTP::Request->new(POST => 'http://www.perl.com/cgi-bin/BugGl impse'); $req->content_type('application/x-www-form-urlencoded'); $req->content('match=www&errors=0'); # Pass request to the user agent and get a response back my $res = $ua->request($req); # Check the outcome of the response if ($res->is_success) { print $res->content; } else { print "Bad luck this time\n"; }