Automated Browsing in Perl
Archive - Originally posted on "The Horse's Mouth" - 2009-09-11 17:15:23 - Graham EllisI'm reminded on today's Perl course just how powerful some of the modules are, and how much you can do in so little code.
LWP::UserAgent turns your Perl into an automated browser .. the following four lines reading the robots.txt off my web site.
use LWP::UserAgent;
$connex = new LWP::UserAgent("agent" => "007");
$response = $connex->get("http://www.wellho.net/robots.txt");
print $response->decoded_content;